Skip to content

Commit 51a67ef

Browse files
committed
Merge branch 'develop' of https://github.com/stacks-network/stacks-core into chore/fix-flakey-tenure-occurs-test
2 parents 05d2158 + c09f17e commit 51a67ef

File tree

1 file changed

+20
-26
lines changed
  • testnet/stacks-node/src/tests/signer

1 file changed

+20
-26
lines changed

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

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3237,13 +3237,16 @@ fn tx_replay_forking_test() {
32373237

32383238
// Now, make a new stacks block, which should clear the tx replay set
32393239
signer_test.mine_nakamoto_block(Duration::from_secs(30), true);
3240-
let (signer_states, _) = signer_test.get_burn_updated_states();
3241-
for state in signer_states {
3242-
assert!(
3243-
state.get_tx_replay_set().is_none(),
3244-
"Signer state is in tx replay state, when it shouldn't be"
3245-
);
3246-
}
3240+
wait_for(30, || {
3241+
let (states, _) = signer_test.get_burn_updated_states();
3242+
if states.is_empty() {
3243+
return Ok(false);
3244+
}
3245+
Ok(states
3246+
.iter()
3247+
.all(|state| state.get_tx_replay_set().is_none()))
3248+
})
3249+
.expect("Unable to confirm tx replay state");
32473250

32483251
// Now, we'll trigger another fork, with more txs, across tenures
32493252

@@ -3504,25 +3507,16 @@ fn tx_replay_rejected_when_forking_across_reward_cycle() {
35043507
assert_eq!(0, post_fork_tx_nonce);
35053508

35063509
info!("----- Check Signers Tx Replay state -----");
3507-
3508-
let info = get_chain_info(&signer_test.running_nodes.conf);
3509-
let all_signers = signer_test.signer_test_pks();
3510-
wait_for_state_machine_update(
3511-
30,
3512-
&info.pox_consensus,
3513-
info.burn_block_height,
3514-
None,
3515-
&all_signers,
3516-
SUPPORTED_SIGNER_PROTOCOL_VERSION,
3517-
)
3518-
.expect("Timed out waiting for signer states to update");
3519-
let (signer_states, _) = signer_test.get_burn_updated_states();
3520-
for state in signer_states {
3521-
assert!(
3522-
state.get_tx_replay_set().is_none(),
3523-
"Signer state is in tx replay state, when it shouldn't be"
3524-
);
3525-
}
3510+
wait_for(30, || {
3511+
let (states, _) = signer_test.get_burn_updated_states();
3512+
if states.is_empty() {
3513+
return Ok(false);
3514+
}
3515+
Ok(states
3516+
.iter()
3517+
.all(|state| state.get_tx_replay_set().is_none()))
3518+
})
3519+
.expect("Unable to confirm tx replay state");
35263520

35273521
signer_test.shutdown();
35283522
}

0 commit comments

Comments
 (0)