Skip to content

Commit c8d00ab

Browse files
committed
Wait for the tip to update before proceeding
Signed-off-by: Jacinta Ferrant <[email protected]>
1 parent 38ae702 commit c8d00ab

File tree

1 file changed

+7
-1
lines changed
  • testnet/stacks-node/src/tests/signer

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4841,7 +4841,13 @@ fn miner_recovers_when_broadcast_block_delay_across_tenures_occurs() {
48414841

48424842
// a tenure has begun, so wait until we mine a block
48434843
wait_for(30, || {
4844-
Ok(mined_blocks.load(Ordering::SeqCst) > blocks_before)
4844+
let new_height = signer_test
4845+
.stacks_client
4846+
.get_peer_info()
4847+
.expect("Failed to get peer info")
4848+
.stacks_tip_height;
4849+
Ok(mined_blocks.load(Ordering::SeqCst) > blocks_before
4850+
&& new_height > info_before.stacks_tip_height)
48454851
})
48464852
.expect("Timed out waiting for block to be mined and processed");
48474853

0 commit comments

Comments
 (0)