Skip to content

Commit a83e5f7

Browse files
committed
refactor: rename helper method to calculate_waste
The name `waste_score` appears to be reseved for a number of UTXO waste calculations in aggregate: https://murch.one/posts/waste-metric/
1 parent 7a62e65 commit a83e5f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ impl WeightedUtxo {
9292
if let Some(effective_value) = positive_effective_value {
9393
let fee = fee_rate.fee_wu(weight)?.to_signed();
9494
let long_term_fee: SignedAmount = long_term_fee_rate.fee_wu(weight)?.to_signed();
95-
let waste = Self::calculate_waste_score(fee, long_term_fee);
95+
let waste = Self::calculate_waste(fee, long_term_fee);
9696
return Some(Self { value, weight, effective_value, fee, long_term_fee, waste });
9797
}
9898

@@ -130,7 +130,7 @@ impl WeightedUtxo {
130130
None
131131
}
132132

133-
fn calculate_waste_score(fee: SignedAmount, long_term_fee: SignedAmount) -> i64 {
133+
fn calculate_waste(fee: SignedAmount, long_term_fee: SignedAmount) -> i64 {
134134
fee.to_sat() - long_term_fee.to_sat()
135135
}
136136
}

0 commit comments

Comments
 (0)