Skip to content

Commit 8b74fbb

Browse files
committed
improved integration test
1 parent 089d2b5 commit 8b74fbb

File tree

1 file changed

+16
-11
lines changed
  • testnet/stacks-node/src/tests/signer

1 file changed

+16
-11
lines changed

testnet/stacks-node/src/tests/signer/v0.rs

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10275,19 +10275,24 @@ fn disallow_reorg_within_first_proposal_burn_block_timing_secs_but_more_than_one
1027510275
block_n_height + 3
1027610276
);
1027710277

10278-
info!("------------------------- Miner 1 Wins the Next Tenure, Mines N+1', got rejected' -------------------------");
10278+
info!("------------------------- Miner 1 Wins the Next Tenure, Mines N+1', got rejected -------------------------");
1027910279
miners.btc_regtest_controller_mut().build_next_block(1);
1028010280

10281-
wait_for(60, || {
10282-
Ok(miners
10283-
.signer_test
10284-
.running_nodes
10285-
.counters
10286-
.naka_rejected_blocks
10287-
.get()
10288-
> 0)
10289-
})
10290-
.unwrap();
10281+
// wait for a block N+1' proposal from miner1
10282+
let proposed_block = wait_for_block_proposal(30, block_n_height + 1, &miner_pk_1)
10283+
.expect("Timed out waiting for block proposal");
10284+
// check it has been rejected
10285+
wait_for_block_global_rejection(
10286+
30,
10287+
proposed_block.header.signer_signature_hash(),
10288+
num_signers,
10289+
)
10290+
.expect("Timed out waiting for a tenure extend proposal to be rejected");
10291+
10292+
assert_eq!(
10293+
get_chain_info(&conf_1).stacks_tip_height,
10294+
block_n_height + 3
10295+
);
1029110296

1029210297
info!("------------------------- Shutdown -------------------------");
1029310298
miners.shutdown();

0 commit comments

Comments
 (0)