Skip to content

Commit

Permalink
Add insufficient funds test
Browse files Browse the repository at this point in the history
  • Loading branch information
yancyribbens committed Jan 7, 2025
1 parent 0c6980e commit 375aa5a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/coin_grinder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,4 +367,20 @@ mod tests {

assert_coin_select_params(&params, 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(&params, None);
}
}

0 comments on commit 375aa5a

Please sign in to comment.