File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
subprojects/gdk_rust/tests Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -381,6 +381,12 @@ impl TestSession {
381
381
NetworkId :: Elements ( _) => assert ! ( !tx. rbf_optin) ,
382
382
NetworkId :: Bitcoin ( _) => assert ! ( tx. rbf_optin) ,
383
383
} ;
384
+ let num_utxos: usize = create_opt. utxos . 0 . iter ( ) . map ( |( _, au) | au. len ( ) ) . sum ( ) ;
385
+ let num_used_utxos = tx. used_utxos . len ( ) ;
386
+ match create_opt. utxo_strategy {
387
+ UtxoStrategy :: Manual => assert_eq ! ( num_used_utxos, num_utxos) ,
388
+ UtxoStrategy :: Default => assert ! ( num_used_utxos > 0 && num_used_utxos <= num_utxos) ,
389
+ }
384
390
let signed_tx = self . session . sign_transaction ( & tx) . unwrap ( ) ;
385
391
assert ! ( signed_tx. user_signed, "tx is not marked as user_signed" ) ;
386
392
self . check_fee_rate ( fee_rate, & signed_tx, MAX_FEE_PERCENT_DIFF ) ;
You can’t perform that action at this time.
0 commit comments