From 375aa5ad3f639f1a9c0922aeb7262566fa311b9f Mon Sep 17 00:00:00 2001 From: yancy Date: Wed, 1 Jan 2025 14:21:47 -0600 Subject: [PATCH] Add insufficient funds test --- src/coin_grinder.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/coin_grinder.rs b/src/coin_grinder.rs index 5bae120..7f8199d 100644 --- a/src/coin_grinder.rs +++ b/src/coin_grinder.rs @@ -367,4 +367,20 @@ mod tests { assert_coin_select_params(¶ms, Some(&["7 sats", "5 sats"])); } + + #[test] + fn insufficient_funds() { + let params = ParamsStr { + target: "49.5 BTC", + change_target: "1000000 sats", + max_weight: "10000", + fee_rate: "0", + weighted_utxos: vec![ + "1 BTC/0/0", + "2 BTC/0/0", + ] + }; + + assert_coin_select_params(¶ms, None); + } }