File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
testnet/stacks-node/src/tests/signer Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -293,6 +293,8 @@ impl SignerTest<SpawnedSigner> {
293
293
fn mine_and_verify_confirmed_naka_block ( & mut self , timeout : Duration , num_signers : usize ) {
294
294
info ! ( "------------------------- Try mining one block -------------------------" ) ;
295
295
296
+ let old_reward_cycle = self . get_current_reward_cycle ( ) ;
297
+
296
298
self . mine_nakamoto_block ( timeout) ;
297
299
298
300
// Verify that the signers accepted the proposed block, sending back a validate ok response
@@ -311,7 +313,16 @@ impl SignerTest<SpawnedSigner> {
311
313
// whenever it has crossed the threshold.
312
314
assert ! ( signature. len( ) >= num_signers * 7 / 10 ) ;
313
315
314
- let reward_cycle = self . get_current_reward_cycle ( ) ;
316
+ let new_reward_cycle = self . get_current_reward_cycle ( ) ;
317
+ let reward_cycle = if new_reward_cycle != old_reward_cycle {
318
+ old_reward_cycle
319
+ } else {
320
+ new_reward_cycle
321
+ } ;
322
+ info ! (
323
+ "Verifying signatures against signers for reward cycle {:?}" ,
324
+ reward_cycle
325
+ ) ;
315
326
let signers = self . get_reward_set_signers ( reward_cycle) ;
316
327
317
328
// Verify that the signers signed the proposed block
@@ -2784,8 +2795,7 @@ fn signer_set_rollover() {
2784
2795
. running_nodes
2785
2796
. btc_regtest_controller
2786
2797
. get_burnchain ( )
2787
- . reward_cycle_to_block_height ( next_reward_cycle)
2788
- . saturating_add ( 1 ) ;
2798
+ . reward_cycle_to_block_height ( next_reward_cycle) ;
2789
2799
2790
2800
info ! ( "---- Mining to next reward set calculation -----" ) ;
2791
2801
signer_test. run_until_burnchain_height_nakamoto (
You can’t perform that action at this time.
0 commit comments