@@ -524,7 +524,7 @@ impl Wallet {
524524 Ok ( address_info. address )
525525 }
526526
527- pub ( crate ) fn cancel_tx ( & self , tx : & Transaction ) -> Result < ( ) , Error > {
527+ pub ( crate ) fn cancel_tx ( & self , tx : Transaction ) -> Result < ( ) , Error > {
528528 let mut locked_wallet = self . inner . lock ( ) . expect ( "lock" ) ;
529529 let mut locked_persister = self . persister . lock ( ) . expect ( "lock" ) ;
530530
@@ -538,12 +538,10 @@ impl Wallet {
538538 }
539539
540540 fn cancel_tx_inner (
541- locked_wallet : & mut PersistedWallet < KVStoreWalletPersister > , tx : & Transaction ,
541+ locked_wallet : & mut PersistedWallet < KVStoreWalletPersister > , tx : Transaction ,
542542 ) {
543- for txout in & tx. output {
544- if let Some ( ( keychain, index) ) =
545- locked_wallet. derivation_of_spk ( txout. script_pubkey . clone ( ) )
546- {
543+ for txout in tx. output {
544+ if let Some ( ( keychain, index) ) = locked_wallet. derivation_of_spk ( txout. script_pubkey ) {
547545 // This mirrors the removed BDK helper: it only frees superficial usage marks.
548546 locked_wallet. unmark_used ( keychain, index) ;
549547 }
@@ -702,7 +700,7 @@ impl Wallet {
702700 None ,
703701 ) ?;
704702
705- Self :: cancel_tx_inner ( & mut locked_wallet, & tmp_psbt. unsigned_tx ) ;
703+ Self :: cancel_tx_inner ( & mut locked_wallet, tmp_psbt. unsigned_tx ) ;
706704
707705 Ok ( max_amount)
708706 }
@@ -732,7 +730,7 @@ impl Wallet {
732730 Some ( & shared_input) ,
733731 ) ?;
734732
735- Self :: cancel_tx_inner ( & mut locked_wallet, & tmp_psbt. unsigned_tx ) ;
733+ Self :: cancel_tx_inner ( & mut locked_wallet, tmp_psbt. unsigned_tx ) ;
736734
737735 Ok ( splice_amount)
738736 }
@@ -788,7 +786,7 @@ impl Wallet {
788786 e
789787 } ) ?;
790788
791- Self :: cancel_tx_inner ( & mut locked_wallet, & tmp_psbt. unsigned_tx ) ;
789+ Self :: cancel_tx_inner ( & mut locked_wallet, tmp_psbt. unsigned_tx ) ;
792790
793791 let mut tx_builder = locked_wallet. build_tx ( ) ;
794792 tx_builder
0 commit comments