Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
yancyribbens committed Jan 14, 2025
1 parent 5a40d0a commit 18608d3
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion src/coin_grinder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ mod tests {
#[test]
fn max_weight_exceeded () {
let mut wu = Vec::new();
for i in 0..10 {
for _i in 0..10 {
wu.push("1 BTC/272");
wu.push("2 BTC/272");
}
Expand All @@ -401,4 +401,25 @@ mod tests {

assert_coin_select_params(&params, None);
}

#[test]
fn max_weight_with_result() {
let mut coins = Vec::new();
for _i in 0..60 {
coins.push("0.33 BTC/272");
}
for _i in 0..10 {
coins.push("2 BTC/272");
}

let params = ParamsStr {
target: "25.33 BTC",
change_target: "1000000 sats",
max_weight: "3000",
fee_rate: "5",
weighted_utxos: coins
};

assert_coin_select_params(&params, None);
}
}

0 comments on commit 18608d3

Please sign in to comment.