Skip to content

Commit 674590c

Browse files
fix(rpc-integration-test): stabilize sign_raw_transaction test
Mine 6 blocks before selecting a UTXO with minconf=6 to ensure there is a confirmed, spendable input (>=2 DASH) after prior mempool activity. Prevents None unwrap when the wallet only has unconfirmed outputs or immature coinbases.
1 parent fd56746 commit 674590c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

rpc-integration-test/src/main.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,9 @@ fn test_sign_raw_transaction_with_send_raw_transaction(cl: &Client) {
784784
minimum_amount: Some(btc(2)),
785785
..Default::default()
786786
};
787+
// Ensure we have confirmed spendable UTXOs; mine 6 blocks to confirm mempool sends
788+
let mine_addr = cl.get_new_address(None).unwrap().require_network(*NET).unwrap();
789+
let _ = cl.generate_to_address(6, &mine_addr).unwrap();
787790
let unspent = cl.list_unspent(Some(6), None, None, None, Some(options)).unwrap();
788791
let unspent = unspent.into_iter().next().unwrap();
789792

0 commit comments

Comments
 (0)