Skip to content

Commit 87eca87

Browse files
upbqdnoxarbitrage
andauthored
change(chain): Split subsidy constants into submodules (ZcashFoundation#10185)
* Refactor subsidy constants into dedicated modules * Use qualified names instead of name suffixes * Restrict subsidy constants modules to crate visibility --------- Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
1 parent c52c65d commit 87eca87

File tree

13 files changed

+615
-578
lines changed

13 files changed

+615
-578
lines changed

zebra-chain/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased]
9+
10+
### Added
11+
12+
- `parameters::network::subsidy::constants` module.
13+
14+
### Removed
15+
16+
- All constants from `parameters::network::subsidy`.
17+
818
## [4.0.0] - 2026-01-21
919

1020
### Breaking Changes

zebra-chain/src/parameters/network.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,11 @@ impl Network {
294294
};
295295

296296
match self {
297-
Self::Mainnet => subsidy::EXPECTED_NU6_1_LOCKBOX_DISBURSEMENTS_TOTAL_MAINNET,
297+
Self::Mainnet => {
298+
subsidy::constants::mainnet::EXPECTED_NU6_1_LOCKBOX_DISBURSEMENTS_TOTAL
299+
}
298300
Self::Testnet(params) if params.is_default_testnet() => {
299-
subsidy::EXPECTED_NU6_1_LOCKBOX_DISBURSEMENTS_TOTAL_TESTNET
301+
subsidy::constants::testnet::EXPECTED_NU6_1_LOCKBOX_DISBURSEMENTS_TOTAL
300302
}
301303
Self::Testnet(params) => params.lockbox_disbursement_total_amount(),
302304
}
@@ -312,9 +314,9 @@ impl Network {
312314
};
313315

314316
let expected_lockbox_disbursements = match self {
315-
Self::Mainnet => subsidy::NU6_1_LOCKBOX_DISBURSEMENTS_MAINNET.to_vec(),
317+
Self::Mainnet => subsidy::constants::mainnet::NU6_1_LOCKBOX_DISBURSEMENTS.to_vec(),
316318
Self::Testnet(params) if params.is_default_testnet() => {
317-
subsidy::NU6_1_LOCKBOX_DISBURSEMENTS_TESTNET.to_vec()
319+
subsidy::constants::testnet::NU6_1_LOCKBOX_DISBURSEMENTS.to_vec()
318320
}
319321
Self::Testnet(params) => return params.lockbox_disbursements(),
320322
};

0 commit comments

Comments
 (0)