multi: apply the new type lntypes.WeightUnit

This commit is contained in:
yyforyongyu committed 2024-05-25 13:37:13 +08:00
1 parent dc9a0b31c0
commit 8da68bb7db
36 files changed
+178 -133

No files matched your search

+2 -2
View File
@@ -116,7 +116,7 @@ func calculateFees(utxos []wallet.Coin, feeRate chainfee.SatPerKWeight,
// Estimate the fee required for a transaction without a change
// output.
totalWeight := int64(weightEstimate.Weight())
totalWeight := weightEstimate.Weight()
requiredFeeNoChange := feeRate.FeeForWeight(totalWeight)
// Estimate the fee required for a transaction with a change output.
@@ -137,7 +137,7 @@ func calculateFees(utxos []wallet.Coin, feeRate chainfee.SatPerKWeight,
// Now that we have added the change output, redo the fee
// estimate.
totalWeight = int64(weightEstimate.Weight())
totalWeight = weightEstimate.Weight()
requiredFeeWithChange := feeRate.FeeForWeight(totalWeight)
return requiredFeeNoChange, requiredFeeWithChange, nil