@@ -175,9 +175,8 @@ impl SignerTest<SpawnedSigner> {
175
175
. wrapping_add ( reward_cycle_len)
176
176
. wrapping_add ( 1 ) ;
177
177
178
- let next_reward_cycle_boundary = epoch_25_reward_cycle_boundary
179
- . wrapping_add ( reward_cycle_len)
180
- . saturating_sub ( 1 ) ;
178
+ let next_reward_cycle_boundary =
179
+ epoch_25_reward_cycle_boundary. wrapping_add ( reward_cycle_len) ;
181
180
run_until_burnchain_height (
182
181
& mut self . running_nodes . btc_regtest_controller ,
183
182
& self . running_nodes . blocks_processed ,
@@ -2146,7 +2145,6 @@ fn mock_sign_epoch_25() {
2146
2145
info ! ( "------------------------- Test Processing Epoch 2.5 Tenures -------------------------" ) ;
2147
2146
2148
2147
// Mine until epoch 3.0 and ensure that no more mock signatures are received
2149
-
2150
2148
let mut reward_cycle = signer_test. get_current_reward_cycle ( ) ;
2151
2149
let mut stackerdb = StackerDB :: new (
2152
2150
& signer_test. running_nodes . conf . node . rpc_bind ,
@@ -2163,19 +2161,33 @@ fn mock_sign_epoch_25() {
2163
2161
assert_eq ! ( signer_slot_ids. len( ) , num_signers) ;
2164
2162
// Mine until epoch 3.0 and ensure we get a new mock signature per epoch 2.5 sortition
2165
2163
let main_poll_time = Instant :: now ( ) ;
2166
- let mut current_burn_block_height = signer_test
2164
+ while signer_test
2167
2165
. running_nodes
2168
2166
. btc_regtest_controller
2169
- . get_headers_height ( ) ;
2170
- while current_burn_block_height + 1 < epoch_3_start_height {
2171
- current_burn_block_height = signer_test
2167
+ . get_headers_height ( )
2168
+ < epoch_3_start_height
2169
+ {
2170
+ next_block_and (
2171
+ & mut signer_test. running_nodes . btc_regtest_controller ,
2172
+ 60 ,
2173
+ || Ok ( true ) ,
2174
+ )
2175
+ . unwrap ( ) ;
2176
+ let current_burn_block_height = signer_test
2172
2177
. running_nodes
2173
2178
. btc_regtest_controller
2174
2179
. get_headers_height ( ) ;
2175
- let current_reward_cycle = signer_test. get_current_reward_cycle ( ) ;
2176
- if current_reward_cycle != reward_cycle {
2177
- debug ! ( "Rolling over reward cycle to {:?}" , current_reward_cycle) ;
2178
- reward_cycle = current_reward_cycle;
2180
+ if current_burn_block_height
2181
+ % signer_test
2182
+ . running_nodes
2183
+ . conf
2184
+ . get_burnchain ( )
2185
+ . pox_constants
2186
+ . reward_cycle_length as u64
2187
+ == 0
2188
+ {
2189
+ reward_cycle += 1 ;
2190
+ debug ! ( "Rolling over reward cycle to {:?}" , reward_cycle) ;
2179
2191
stackerdb = StackerDB :: new (
2180
2192
& signer_test. running_nodes . conf . node . rpc_bind ,
2181
2193
StacksPrivateKey :: new ( ) , // We are just reading so don't care what the key is
@@ -2190,12 +2202,6 @@ fn mock_sign_epoch_25() {
2190
2202
. collect ( ) ;
2191
2203
assert_eq ! ( signer_slot_ids. len( ) , num_signers) ;
2192
2204
}
2193
- next_block_and (
2194
- & mut signer_test. running_nodes . btc_regtest_controller ,
2195
- 60 ,
2196
- || Ok ( true ) ,
2197
- )
2198
- . unwrap ( ) ;
2199
2205
let mut mock_signatures = vec ! [ ] ;
2200
2206
let mock_poll_time = Instant :: now ( ) ;
2201
2207
debug ! ( "Waiting for mock signatures for burn block height {current_burn_block_height}" ) ;
0 commit comments