@@ -175,6 +175,7 @@ fn main() {
175
175
test_wallet_process_psbt ( & cl) ;
176
176
test_join_psbt ( & cl) ;
177
177
test_combine_psbt ( & cl) ;
178
+ test_combine_raw_transaction ( & cl) ;
178
179
test_create_psbt ( & cl) ;
179
180
test_finalize_psbt ( & cl) ;
180
181
test_list_received_by_address ( & cl) ;
@@ -849,6 +850,27 @@ fn test_combine_psbt(cl: &Client) {
849
850
assert ! ( !psbt. is_empty( ) ) ;
850
851
}
851
852
853
+ fn test_combine_raw_transaction ( cl : & Client ) {
854
+ let options = json:: ListUnspentQueryOptions {
855
+ minimum_amount : Some ( btc ( 2 ) ) ,
856
+ ..Default :: default ( )
857
+ } ;
858
+ let unspent = cl. list_unspent ( Some ( 6 ) , None , None , None , Some ( options) ) . unwrap ( ) ;
859
+ let unspent = unspent. into_iter ( ) . nth ( 0 ) . unwrap ( ) ;
860
+ let input = json:: CreateRawTransactionInput {
861
+ txid : unspent. txid ,
862
+ vout : unspent. vout ,
863
+ sequence : None ,
864
+ } ;
865
+ let mut output = HashMap :: new ( ) ;
866
+ output. insert ( RANDOM_ADDRESS . to_string ( ) , btc ( 1 ) ) ;
867
+ let tx = cl. create_raw_transaction_hex ( & [ input. clone ( ) ] , & output, Some ( 500_000 ) , None ) . unwrap ( ) ;
868
+
869
+ let transaction = cl. combine_raw_transaction ( & [ tx. clone ( ) , tx] ) . unwrap ( ) ;
870
+
871
+ assert ! ( !transaction. is_empty( ) ) ;
872
+ }
873
+
852
874
fn test_create_psbt ( cl : & Client ) {
853
875
let options = json:: ListUnspentQueryOptions {
854
876
minimum_amount : Some ( btc ( 2 ) ) ,
0 commit comments