@@ -3668,7 +3668,6 @@ fn tx_replay_btc_on_stx_invalidation() {
3668
3668
3669
3669
info!("------------------------- Beginning test -------------------------");
3670
3670
3671
- let pre_fork_tenures = 10;
3672
3671
let burnchain = conf.get_burnchain();
3673
3672
3674
3673
let tip = signer_test.get_peer_info();
@@ -3681,31 +3680,31 @@ fn tx_replay_btc_on_stx_invalidation() {
3681
3680
"pox_info" => ?pox_info,
3682
3681
);
3683
3682
3683
+ info!("Submitting first pre-stx op");
3684
+ let pre_stx_op = PreStxOp {
3685
+ output: sender_addr,
3686
+ // to be filled in
3687
+ txid: Txid([0u8; 32]),
3688
+ vtxindex: 0,
3689
+ block_height: 0,
3690
+ burn_header_hash: BurnchainHeaderHash([0u8; 32]),
3691
+ };
3692
+
3693
+ assert!(
3694
+ btc_controller
3695
+ .submit_operation(
3696
+ StacksEpochId::Epoch30,
3697
+ BlockstackOperationType::PreStx(pre_stx_op),
3698
+ &mut miner_keychain,
3699
+ 1
3700
+ )
3701
+ .is_ok(),
3702
+ "Pre-stx operation should submit successfully"
3703
+ );
3704
+
3705
+ let pre_fork_tenures = 9;
3684
3706
for i in 0..pre_fork_tenures {
3685
3707
info!("Mining pre-fork tenure {} of {pre_fork_tenures}", i + 1);
3686
- if i == 0 {
3687
- info!("Submitting first pre-stx op");
3688
- let pre_stx_op = PreStxOp {
3689
- output: sender_addr,
3690
- // to be filled in
3691
- txid: Txid([0u8; 32]),
3692
- vtxindex: 0,
3693
- block_height: 0,
3694
- burn_header_hash: BurnchainHeaderHash([0u8; 32]),
3695
- };
3696
-
3697
- assert!(
3698
- btc_controller
3699
- .submit_operation(
3700
- StacksEpochId::Epoch30,
3701
- BlockstackOperationType::PreStx(pre_stx_op),
3702
- &mut miner_keychain,
3703
- 1
3704
- )
3705
- .is_ok(),
3706
- "Pre-stx operation should submit successfully"
3707
- );
3708
- }
3709
3708
signer_test.mine_nakamoto_block(Duration::from_secs(30), true);
3710
3709
}
3711
3710
@@ -3776,8 +3775,6 @@ fn tx_replay_btc_on_stx_invalidation() {
3776
3775
3777
3776
info!("---- Wait for tx replay set to be updated ----");
3778
3777
3779
- let mut last_log = Instant::now();
3780
- last_log -= Duration::from_secs(5);
3781
3778
signer_test
3782
3779
.wait_for_signer_state_check(30, |state| {
3783
3780
let Some(tx_replay_set) = state.get_tx_replay_set() else {
@@ -3791,14 +3788,6 @@ fn tx_replay_btc_on_stx_invalidation() {
3791
3788
"len_ok" => len_ok,
3792
3789
"txid_ok" => txid_ok,
3793
3790
);
3794
- if last_log.elapsed() > Duration::from_secs(5) {
3795
- info!("---- Signer state check ----";
3796
- "tx_replay_set" => ?tx_replay_set,
3797
- "len_ok" => len_ok,
3798
- "txid_ok" => txid_ok,
3799
- );
3800
- last_log = Instant::now();
3801
- }
3802
3791
Ok(len_ok && txid_ok)
3803
3792
})
3804
3793
.expect("Timed out waiting for tx replay set to be updated");
0 commit comments