Skip to content

Commit

Permalink
test: ensure miner 2 is up to tip before continuing
Browse files Browse the repository at this point in the history
  • Loading branch information
obycode committed Nov 21, 2024
1 parent 2ec4eec commit dc6827f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion testnet/stacks-node/src/tests/signer/v0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7726,9 +7726,11 @@ fn tenure_extend_after_bad_commit() {
.get_peer_info()
.expect("Failed to get peer info")
.stacks_tip_height;
let info_2 = get_chain_info(&conf_node_2);
Ok(
blocks_mined1.load(Ordering::SeqCst) > blocks_processed_before_1
&& stacks_height > stacks_height_before
&& info_2.stacks_tip_height > stacks_height_before
&& test_observer::get_blocks().len() > nmb_old_blocks,
)
})
Expand Down Expand Up @@ -7765,9 +7767,11 @@ fn tenure_extend_after_bad_commit() {
.get_peer_info()
.expect("Failed to get peer info")
.stacks_tip_height;
let info_2 = get_chain_info(&conf_node_2);
Ok(
blocks_mined1.load(Ordering::SeqCst) > blocks_processed_before_1
&& stacks_height > stacks_height_before
&& info_2.stacks_tip_height > stacks_height_before
&& test_observer::get_blocks().len() > nmb_old_blocks,
)
})
Expand Down Expand Up @@ -7833,9 +7837,11 @@ fn tenure_extend_after_bad_commit() {
.get_peer_info()
.expect("Failed to get peer info")
.stacks_tip_height;
let info_2 = get_chain_info(&conf_node_2);
Ok(
blocks_mined1.load(Ordering::SeqCst) > blocks_processed_before_1
&& stacks_height > stacks_height_before
&& info_2.stacks_tip_height > stacks_height_before
&& test_observer::get_blocks().len() > nmb_old_blocks,
)
})
Expand Down Expand Up @@ -7883,9 +7889,11 @@ fn tenure_extend_after_bad_commit() {
.get_peer_info()
.expect("Failed to get peer info")
.stacks_tip_height;
let info_2 = get_chain_info(&conf_node_2);
Ok(
blocks_mined1.load(Ordering::SeqCst) > blocks_processed_before_1
&& stacks_height > stacks_height_before
&& info_2.stacks_tip_height > stacks_height_before
&& test_observer::get_blocks().len() > nmb_old_blocks,
)
})
Expand Down Expand Up @@ -7921,9 +7929,11 @@ fn tenure_extend_after_bad_commit() {
.get_peer_info()
.expect("Failed to get peer info")
.stacks_tip_height;
let info_2 = get_chain_info(&conf_node_2);
Ok(
blocks_mined1.load(Ordering::SeqCst) > blocks_processed_before_1
&& stacks_height > stacks_height_before
&& info_2.stacks_tip_height > stacks_height_before
&& test_observer::get_blocks().len() > nmb_old_blocks,
)
})
Expand Down Expand Up @@ -7956,7 +7966,9 @@ fn tenure_extend_after_bad_commit() {
.get_peer_info()
.expect("Failed to get peer info")
.stacks_tip_height;
Ok(stacks_height > stacks_height_before)
let info_2 = get_chain_info(&conf_node_2);
Ok(stacks_height > stacks_height_before
&& info_2.stacks_tip_height > stacks_height_before)
},
)
.expect("Timed out waiting for final block to be mined and processed");
Expand Down

0 comments on commit dc6827f

Please sign in to comment.