Skip to content

Commit 8a08bf5

Browse files
committed
refactor: Don't calculate fee redundantly in build_fee_bump
1 parent 61626d4 commit 8a08bf5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/wallet/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,9 +1746,7 @@ impl Wallet {
17461746
let fee = self
17471747
.calculate_fee(&tx)
17481748
.map_err(|_| BuildFeeBumpError::FeeRateUnavailable)?;
1749-
let fee_rate = self
1750-
.calculate_fee_rate(&tx)
1751-
.map_err(|_| BuildFeeBumpError::FeeRateUnavailable)?;
1749+
let fee_rate = fee / tx.weight();
17521750

17531751
// Remove the inputs from the tx and process them.
17541752
let utxos: Vec<WeightedUtxo> = tx

0 commit comments

Comments
 (0)