@@ -3071,36 +3071,6 @@ fn tx_replay_forking_test() {
3071
3071
);
3072
3072
let conf = signer_test.running_nodes.conf.clone();
3073
3073
let http_origin = format!("http://{}", &conf.node.rpc_bind);
3074
- let _miner_address = Keychain::default(conf.node.seed.clone())
3075
- .origin_address(conf.is_mainnet())
3076
- .unwrap();
3077
- let miner_pk = signer_test
3078
- .running_nodes
3079
- .btc_regtest_controller
3080
- .get_mining_pubkey()
3081
- .as_deref()
3082
- .map(Secp256k1PublicKey::from_hex)
3083
- .unwrap()
3084
- .unwrap();
3085
-
3086
- let get_unconfirmed_commit_data = |btc_controller: &mut BitcoinRegtestController| {
3087
- let unconfirmed_utxo = btc_controller
3088
- .get_all_utxos(&miner_pk)
3089
- .into_iter()
3090
- .find(|utxo| utxo.confirmations == 0)?;
3091
- let unconfirmed_txid = Txid::from_bitcoin_tx_hash(&unconfirmed_utxo.txid);
3092
- let unconfirmed_tx = btc_controller.get_raw_transaction(&unconfirmed_txid);
3093
- let unconfirmed_tx_opreturn_bytes = unconfirmed_tx.output[0].script_pubkey.as_bytes();
3094
- info!(
3095
- "Unconfirmed tx bytes: {}",
3096
- stacks::util::hash::to_hex(unconfirmed_tx_opreturn_bytes)
3097
- );
3098
- let data = LeaderBlockCommitOp::parse_data(
3099
- &unconfirmed_tx_opreturn_bytes[unconfirmed_tx_opreturn_bytes.len() - 77..],
3100
- )
3101
- .unwrap();
3102
- Some(data)
3103
- };
3104
3074
3105
3075
signer_test.boot_to_epoch_3();
3106
3076
info!("------------------------- Reached Epoch 3.0 -------------------------");
@@ -3205,26 +3175,9 @@ fn tx_replay_forking_test() {
3205
3175
next_block_and_controller(
3206
3176
&mut signer_test.running_nodes.btc_regtest_controller,
3207
3177
60,
3208
- |btc_controller| {
3209
- let commits_submitted = submitted_commits
3210
- .load(Ordering::SeqCst);
3211
- if commits_submitted <= commits_count {
3212
- // wait until a commit was submitted
3213
- return Ok(false)
3214
- }
3215
- let Some(payload) = get_unconfirmed_commit_data(btc_controller) else {
3216
- warn!("Commit submitted, but bitcoin doesn't see it in the unconfirmed UTXO set, will try to wait.");
3217
- return Ok(false)
3218
- };
3219
- let burn_parent_modulus = payload.burn_parent_modulus;
3220
- let current_modulus = u8::try_from((current_burn_height + 1) % 5).unwrap();
3221
- info!(
3222
- "Ongoing Commit Operation check";
3223
- "burn_parent_modulus" => burn_parent_modulus,
3224
- "current_modulus" => current_modulus,
3225
- "payload" => ?payload,
3226
- );
3227
- Ok(burn_parent_modulus == current_modulus)
3178
+ |_btc_controller| {
3179
+ let commits_submitted = submitted_commits.load(Ordering::SeqCst);
3180
+ Ok(commits_submitted > commits_count)
3228
3181
},
3229
3182
)
3230
3183
.unwrap();
0 commit comments