multi: apply the new type lntypes.WeightUnit
This commit is contained in:
36 files changed
+178
-133
No files matched your search
@@ -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
|
||||
|
||||
@@ -50,7 +50,7 @@ func fundingFee(feeRate chainfee.SatPerKWeight, numInput int, // nolint:unparam
|
||||
weightEstimate.AddP2TROutput()
|
||||
}
|
||||
|
||||
totalWeight := int64(weightEstimate.Weight())
|
||||
totalWeight := weightEstimate.Weight()
|
||||
return feeRate.FeeForWeight(totalWeight)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user