diff --git a/src/single_random_draw.rs b/src/single_random_draw.rs index 1d10e15..67f93c5 100644 --- a/src/single_random_draw.rs +++ b/src/single_random_draw.rs @@ -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() {