@@ -1512,7 +1512,7 @@ impl BitcoinRegtestController {
1512
1512
let ongoing_op = self . ongoing_block_commit . take ( ) . unwrap ( ) ;
1513
1513
1514
1514
let _ = self . sortdb_mut ( ) ;
1515
- let burnchain_db = self . burnchain_db . as_ref ( ) . expect ( "BurnchainDB not opened" ) ;
1515
+ let burnchain_db = self . burnchain_db . as_ref ( ) . expect ( "BurnchainDB not opened" ) ;
1516
1516
1517
1517
for txid in ongoing_op. txids . iter ( ) {
1518
1518
// check if ongoing_op is in the burnchain_db *or* has been confirmed via the bitcoin RPC
@@ -3670,7 +3670,7 @@ mod tests {
3670
3670
3671
3671
#[ test]
3672
3672
#[ ignore]
3673
- fn test_build_leader_block_commit_tx_ok_rbf_while_prev_is_confirmed ( ) {
3673
+ fn test_build_leader_block_commit_tx_ok_while_prev_is_confirmed ( ) {
3674
3674
if env:: var ( "BITCOIND_TEST" ) != Ok ( "1" . into ( ) ) {
3675
3675
return ;
3676
3676
}
@@ -3710,45 +3710,45 @@ mod tests {
3710
3710
// Now tx is confirmed: prev utxo is updated and one more utxo is generated
3711
3711
utils:: mine_tx ( & btc_controller, first_tx_ok) ;
3712
3712
3713
- //re-gen signer othewise fails because it will be disposed during previous commit tx.
3713
+ // re-gen signer othewise fails because it will be disposed during previous commit tx.
3714
3714
let mut signer = keychain. generate_op_signer ( ) ;
3715
- //small change to the commit op payload
3715
+ // Modify the commit operation payload slightly, so it no longer matches the confirmed version.
3716
3716
commit_op. burn_fee += 10 ;
3717
3717
3718
- let rbf_tx = btc_controller
3718
+ let new_tx = btc_controller
3719
3719
. build_leader_block_commit_tx (
3720
3720
StacksEpochId :: Epoch31 ,
3721
3721
commit_op. clone ( ) ,
3722
3722
& mut signer,
3723
3723
)
3724
- . expect ( "Commit tx should be rbf-ed " ) ;
3724
+ . expect ( "Commit tx should be created! " ) ;
3725
3725
3726
3726
assert ! ( op_signer. is_disposed( ) ) ;
3727
3727
3728
- assert_eq ! ( 1 , rbf_tx . version) ;
3729
- assert_eq ! ( 0 , rbf_tx . lock_time) ;
3730
- assert_eq ! ( 1 , rbf_tx . input. len( ) ) ;
3731
- assert_eq ! ( 4 , rbf_tx . output. len( ) ) ;
3728
+ assert_eq ! ( 1 , new_tx . version) ;
3729
+ assert_eq ! ( 0 , new_tx . lock_time) ;
3730
+ assert_eq ! ( 1 , new_tx . input. len( ) ) ;
3731
+ assert_eq ! ( 4 , new_tx . output. len( ) ) ;
3732
3732
3733
3733
// utxos list contains the sole utxo used by prev commit operation
3734
- // because has enough amount to cover the rfb commit
3734
+ // because has enough amount to cover the new commit
3735
3735
let used_utxos: Vec < UTXO > = btc_controller
3736
3736
. get_all_utxos ( & miner_pubkey)
3737
3737
. into_iter ( )
3738
3738
. filter ( |utxo| utxo. txid == first_txid)
3739
3739
. collect ( ) ;
3740
3740
3741
- let input_0 = utils:: txin_at_index ( & rbf_tx , & op_signer, & used_utxos, 0 ) ;
3742
- assert_eq ! ( input_0, rbf_tx . input[ 0 ] ) ;
3741
+ let input_0 = utils:: txin_at_index ( & new_tx , & op_signer, & used_utxos, 0 ) ;
3742
+ assert_eq ! ( input_0, new_tx . input[ 0 ] ) ;
3743
3743
3744
3744
let op_return = utils:: txout_opreturn ( & commit_op, & config. burnchain . magic_bytes , 5_500 ) ;
3745
3745
let op_commit_1 = utils:: txout_opdup_commit_to ( & commit_op. commit_outs [ 0 ] , 55_005 ) ;
3746
3746
let op_commit_2 = utils:: txout_opdup_commit_to ( & commit_op. commit_outs [ 1 ] , 55_005 ) ;
3747
3747
let op_change = utils:: txout_opdup_change_legacy ( & mut signer, 4_999_730_590 ) ;
3748
- assert_eq ! ( op_return, rbf_tx . output[ 0 ] ) ;
3749
- assert_eq ! ( op_commit_1, rbf_tx . output[ 1 ] ) ;
3750
- assert_eq ! ( op_commit_2, rbf_tx . output[ 2 ] ) ;
3751
- assert_eq ! ( op_change, rbf_tx . output[ 3 ] ) ;
3748
+ assert_eq ! ( op_return, new_tx . output[ 0 ] ) ;
3749
+ assert_eq ! ( op_commit_1, new_tx . output[ 1 ] ) ;
3750
+ assert_eq ! ( op_commit_2, new_tx . output[ 2 ] ) ;
3751
+ assert_eq ! ( op_change, new_tx . output[ 3 ] ) ;
3752
3752
}
3753
3753
3754
3754
#[ test]
0 commit comments