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 8, 2025
1 parent d563dd6 commit b2a29f8
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 @@ -366,4 +366,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 b2a29f8

Please sign in to comment.