From c72d8a0d239ab2d9dd397a723b5e3eb689a599d1 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 e0fe81a..4ef6d5d 100644 --- a/src/coin_grinder.rs +++ b/src/coin_grinder.rs @@ -365,4 +365,20 @@ mod tests { assert_coin_select_params(¶ms, Some(&["7 sats", "5 sats"])); } + + #[test] + fn insufficient_funds() { + let params = ParamsStr { + target: "49.5 cBTC", + change_target: "1000000 sats", + max_weight: "10000", + fee_rate: "0", + weighted_utxos: vec![ + "1 cBTC/0/0", + "2 cBTC/0/0", + ] + }; + + assert_coin_select_params(¶ms, None); + } }