@@ -598,7 +598,7 @@ macro_rules! bdk_blockchain_tests {
598
598
assert!( finalized, "Cannot finalize transaction" ) ;
599
599
let tx = psbt. extract_tx( ) ;
600
600
println!( "{}" , bitcoin:: consensus:: encode:: serialize_hex( & tx) ) ;
601
- wallet. broadcast( tx) . unwrap( ) ;
601
+ wallet. broadcast( & tx) . unwrap( ) ;
602
602
wallet. sync( noop_progress( ) , None ) . unwrap( ) ;
603
603
assert_eq!( wallet. get_balance( ) . unwrap( ) , details. received, "incorrect balance after send" ) ;
604
604
@@ -649,7 +649,7 @@ macro_rules! bdk_blockchain_tests {
649
649
650
650
let finalized = wallet. sign( & mut psbt, Default :: default ( ) ) . unwrap( ) ;
651
651
assert!( finalized, "Cannot finalize transaction" ) ;
652
- let sent_txid = wallet. broadcast( psbt. extract_tx( ) ) . unwrap( ) ;
652
+ let sent_txid = wallet. broadcast( & psbt. extract_tx( ) ) . unwrap( ) ;
653
653
654
654
wallet. sync( noop_progress( ) , None ) . unwrap( ) ;
655
655
assert_eq!( wallet. get_balance( ) . unwrap( ) , details. received, "incorrect balance after receive" ) ;
@@ -692,7 +692,7 @@ macro_rules! bdk_blockchain_tests {
692
692
let ( mut psbt, details) = builder. finish( ) . unwrap( ) ;
693
693
let finalized = wallet. sign( & mut psbt, Default :: default ( ) ) . unwrap( ) ;
694
694
assert!( finalized, "Cannot finalize transaction" ) ;
695
- wallet. broadcast( psbt. extract_tx( ) ) . unwrap( ) ;
695
+ wallet. broadcast( & psbt. extract_tx( ) ) . unwrap( ) ;
696
696
697
697
wallet. sync( noop_progress( ) , None ) . unwrap( ) ;
698
698
@@ -731,7 +731,7 @@ macro_rules! bdk_blockchain_tests {
731
731
let ( mut psbt, details) = builder. finish( ) . unwrap( ) ;
732
732
let finalized = wallet. sign( & mut psbt, Default :: default ( ) ) . unwrap( ) ;
733
733
assert!( finalized, "Cannot finalize transaction" ) ;
734
- wallet. broadcast( psbt. extract_tx( ) ) . unwrap( ) ;
734
+ wallet. broadcast( & psbt. extract_tx( ) ) . unwrap( ) ;
735
735
wallet. sync( noop_progress( ) , None ) . unwrap( ) ;
736
736
assert_eq!( wallet. get_balance( ) . unwrap( ) , 50_000 - details. fee. unwrap_or( 0 ) - 5_000 , "incorrect balance from fees" ) ;
737
737
assert_eq!( wallet. get_balance( ) . unwrap( ) , details. received, "incorrect balance from received" ) ;
@@ -741,7 +741,7 @@ macro_rules! bdk_blockchain_tests {
741
741
let ( mut new_psbt, new_details) = builder. finish( ) . unwrap( ) ;
742
742
let finalized = wallet. sign( & mut new_psbt, Default :: default ( ) ) . unwrap( ) ;
743
743
assert!( finalized, "Cannot finalize transaction" ) ;
744
- wallet. broadcast( new_psbt. extract_tx( ) ) . unwrap( ) ;
744
+ wallet. broadcast( & new_psbt. extract_tx( ) ) . unwrap( ) ;
745
745
wallet. sync( noop_progress( ) , None ) . unwrap( ) ;
746
746
assert_eq!( wallet. get_balance( ) . unwrap( ) , 50_000 - new_details. fee. unwrap_or( 0 ) - 5_000 , "incorrect balance from fees after bump" ) ;
747
747
assert_eq!( wallet. get_balance( ) . unwrap( ) , new_details. received, "incorrect balance from received after bump" ) ;
@@ -766,7 +766,7 @@ macro_rules! bdk_blockchain_tests {
766
766
let ( mut psbt, details) = builder. finish( ) . unwrap( ) ;
767
767
let finalized = wallet. sign( & mut psbt, Default :: default ( ) ) . unwrap( ) ;
768
768
assert!( finalized, "Cannot finalize transaction" ) ;
769
- wallet. broadcast( psbt. extract_tx( ) ) . unwrap( ) ;
769
+ wallet. broadcast( & psbt. extract_tx( ) ) . unwrap( ) ;
770
770
wallet. sync( noop_progress( ) , None ) . unwrap( ) ;
771
771
assert_eq!( wallet. get_balance( ) . unwrap( ) , 1_000 - details. fee. unwrap_or( 0 ) , "incorrect balance after send" ) ;
772
772
assert_eq!( wallet. get_balance( ) . unwrap( ) , details. received, "incorrect received after send" ) ;
@@ -776,7 +776,7 @@ macro_rules! bdk_blockchain_tests {
776
776
let ( mut new_psbt, new_details) = builder. finish( ) . unwrap( ) ;
777
777
let finalized = wallet. sign( & mut new_psbt, Default :: default ( ) ) . unwrap( ) ;
778
778
assert!( finalized, "Cannot finalize transaction" ) ;
779
- wallet. broadcast( new_psbt. extract_tx( ) ) . unwrap( ) ;
779
+ wallet. broadcast( & new_psbt. extract_tx( ) ) . unwrap( ) ;
780
780
wallet. sync( noop_progress( ) , None ) . unwrap( ) ;
781
781
assert_eq!( wallet. get_balance( ) . unwrap( ) , 0 , "incorrect balance after change removal" ) ;
782
782
assert_eq!( new_details. received, 0 , "incorrect received after change removal" ) ;
@@ -801,7 +801,7 @@ macro_rules! bdk_blockchain_tests {
801
801
let ( mut psbt, details) = builder. finish( ) . unwrap( ) ;
802
802
let finalized = wallet. sign( & mut psbt, Default :: default ( ) ) . unwrap( ) ;
803
803
assert!( finalized, "Cannot finalize transaction" ) ;
804
- wallet. broadcast( psbt. extract_tx( ) ) . unwrap( ) ;
804
+ wallet. broadcast( & psbt. extract_tx( ) ) . unwrap( ) ;
805
805
wallet. sync( noop_progress( ) , None ) . unwrap( ) ;
806
806
assert_eq!( wallet. get_balance( ) . unwrap( ) , 26_000 - details. fee. unwrap_or( 0 ) , "incorrect balance after send" ) ;
807
807
assert_eq!( details. received, 1_000 - details. fee. unwrap_or( 0 ) , "incorrect received after send" ) ;
@@ -811,7 +811,7 @@ macro_rules! bdk_blockchain_tests {
811
811
let ( mut new_psbt, new_details) = builder. finish( ) . unwrap( ) ;
812
812
let finalized = wallet. sign( & mut new_psbt, Default :: default ( ) ) . unwrap( ) ;
813
813
assert!( finalized, "Cannot finalize transaction" ) ;
814
- wallet. broadcast( new_psbt. extract_tx( ) ) . unwrap( ) ;
814
+ wallet. broadcast( & new_psbt. extract_tx( ) ) . unwrap( ) ;
815
815
wallet. sync( noop_progress( ) , None ) . unwrap( ) ;
816
816
assert_eq!( new_details. sent, 75_000 , "incorrect sent" ) ;
817
817
assert_eq!( wallet. get_balance( ) . unwrap( ) , new_details. received, "incorrect balance after add input" ) ;
@@ -834,7 +834,7 @@ macro_rules! bdk_blockchain_tests {
834
834
let ( mut psbt, details) = builder. finish( ) . unwrap( ) ;
835
835
let finalized = wallet. sign( & mut psbt, Default :: default ( ) ) . unwrap( ) ;
836
836
assert!( finalized, "Cannot finalize transaction" ) ;
837
- wallet. broadcast( psbt. extract_tx( ) ) . unwrap( ) ;
837
+ wallet. broadcast( & psbt. extract_tx( ) ) . unwrap( ) ;
838
838
wallet. sync( noop_progress( ) , None ) . unwrap( ) ;
839
839
assert_eq!( wallet. get_balance( ) . unwrap( ) , 26_000 - details. fee. unwrap_or( 0 ) , "incorrect balance after send" ) ;
840
840
assert_eq!( details. received, 1_000 - details. fee. unwrap_or( 0 ) , "incorrect received after send" ) ;
@@ -846,7 +846,7 @@ macro_rules! bdk_blockchain_tests {
846
846
847
847
let finalized = wallet. sign( & mut new_psbt, Default :: default ( ) ) . unwrap( ) ;
848
848
assert!( finalized, "Cannot finalize transaction" ) ;
849
- wallet. broadcast( new_psbt. extract_tx( ) ) . unwrap( ) ;
849
+ wallet. broadcast( & new_psbt. extract_tx( ) ) . unwrap( ) ;
850
850
wallet. sync( noop_progress( ) , None ) . unwrap( ) ;
851
851
assert_eq!( new_details. sent, 75_000 , "incorrect sent" ) ;
852
852
assert_eq!( wallet. get_balance( ) . unwrap( ) , 0 , "incorrect balance after add input" ) ;
0 commit comments