@@ -122,22 +122,21 @@ pub struct CoinbaseInterval {
122
122
pub effective_start_height : u64 ,
123
123
}
124
124
125
- /// From SIP-029:
126
- ///
127
- /// | Coinbase Interval | Bitcoin Height | Offset Height | Approx. Supply | STX Reward | Annual Inflation |
128
- /// |--------------------|----------------|---------------------|------------------|------------|------------------|
129
- /// | Current | - | - | 1,552,452,847 | 1000 | - |
130
- /// | 1st | 945,000 | 278,950 | 1,627,352,847 | 500 (50%) | 3.23% |
131
- /// | 2nd | 1,050,000 | 383,950 | 1,679,852,847 | 250 (50%) | 1.57% |
132
- /// | 3rd | 1,260,000 | 593,950 | 1,732,352,847 | 125 (50%) | 0.76% |
133
- /// | 4th | 1,470,000 | 803,950 | 1,758,602,847 | 62.5 (50%) | 0.37% |
134
- /// | - | 2,197,560 | 1,531,510 | 1,804,075,347 | 62.5 (0%) | 0.18% |
135
- ///
136
- /// The above is for mainnet, which has a burnchain year of 52596 blocks and starts at burnchain height 666050.
137
- /// The `Offset Height` column is simply the difference between `Bitcoin Height` and 666050.
138
- ///
125
+ // From SIP-029:
126
+ //
127
+ // | Coinbase Interval | Bitcoin Height | Offset Height | Approx. Supply | STX Reward | Annual Inflation |
128
+ // |--------------------|----------------|---------------------|------------------|------------|------------------|
129
+ // | Current | - | - | 1,552,452,847 | 1000 | - |
130
+ // | 1st | 945,000 | 278,950 | 1,627,352,847 | 500 (50%) | 3.23% |
131
+ // | 2nd | 1,050,000 | 383,950 | 1,679,852,847 | 250 (50%) | 1.57% |
132
+ // | 3rd | 1,260,000 | 593,950 | 1,732,352,847 | 125 (50%) | 0.76% |
133
+ // | 4th | 1,470,000 | 803,950 | 1,758,602,847 | 62.5 (50%) | 0.37% |
134
+ // | - | 2,197,560 | 1,531,510 | 1,804,075,347 | 62.5 (0%) | 0.18% |
135
+ //
136
+ // The above is for mainnet, which has a burnchain year of 52596 blocks and starts at burnchain height 666050.
137
+
139
138
/// Mainnet coinbase intervals, as of SIP-029
140
- // This static value is lazily initialized using `OnceLock` to avoid unnecessary
139
+ // This static value is lazily initialized using `OnceLock` to avoid unnecessary
141
140
// computation at program startup while ensuring thread safety and one-time initialization.
142
141
// The intervals define the emission schedule for mainnet and are validated at runtime.
143
142
pub static COINBASE_INTERVALS_MAINNET : OnceLock < [ CoinbaseInterval ; 5 ] > = OnceLock :: new ( ) ;
@@ -173,7 +172,7 @@ pub fn get_coinbase_intervals_mainnet() -> &'static [CoinbaseInterval; 5] {
173
172
174
173
/// Testnet coinbase intervals as defined by SIP-029.
175
174
///
176
- /// This static value is lazily initialized using `OnceLock` to avoid unnecessary
175
+ /// This static value is lazily initialized using `OnceLock` to avoid unnecessary
177
176
/// computation at program startup while ensuring thread safety and one-time initialization.
178
177
/// The intervals define the emission schedule for testnet and are validated at runtime.
179
178
pub static COINBASE_INTERVALS_TESTNET : OnceLock < [ CoinbaseInterval ; 5 ] > = OnceLock :: new ( ) ;
@@ -261,7 +260,7 @@ impl CoinbaseInterval {
261
260
}
262
261
263
262
let mut ht = intervals[ 0 ] . effective_start_height ;
264
- for interval in intervals {
263
+ for interval in intervals {
265
264
if interval. effective_start_height < ht {
266
265
return false ;
267
266
}
@@ -553,13 +552,11 @@ impl StacksEpochId {
553
552
| StacksEpochId :: Epoch30 => {
554
553
self . coinbase_reward_pre_sip029 ( first_burnchain_height, current_burnchain_height)
555
554
}
556
- StacksEpochId :: Epoch31 => {
557
- self . coinbase_reward_sip029 (
558
- mainnet,
559
- first_burnchain_height,
560
- current_burnchain_height,
561
- )
562
- }
555
+ StacksEpochId :: Epoch31 => self . coinbase_reward_sip029 (
556
+ mainnet,
557
+ first_burnchain_height,
558
+ current_burnchain_height,
559
+ ) ,
563
560
}
564
561
}
565
562
}
0 commit comments