Skip to content

Commit

Permalink
Refactor SRD selection
Browse files Browse the repository at this point in the history
  • Loading branch information
yancyribbens committed Oct 8, 2024
1 parent 49655c0 commit 8af14b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/single_random_draw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ pub fn select_coins_srd<'a, R: rand::Rng + ?Sized, Utxo: WeightedUtxo>(
let mut value = Amount::ZERO;

for w_utxo in origin {
let utxo_value = w_utxo.value();
let effective_value = effective_value(fee_rate, w_utxo.satisfaction_weight(), utxo_value);
let value = w_utxo.value();
let weight = w_utxo.satisfaction_weight();
let effective_value = effective_value(fee_rate, value, weight);

if let Some(e) = effective_value {
if let Ok(v) = e.to_unsigned() {
Expand Down

0 comments on commit 8af14b8

Please sign in to comment.