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

+3 -2
View File
@@ -19,6 +19,7 @@ import (
"github.com/lightningnetwork/lnd/input"
"github.com/lightningnetwork/lnd/kvdb"
"github.com/lightningnetwork/lnd/labels"
"github.com/lightningnetwork/lnd/lntypes"
"github.com/lightningnetwork/lnd/lnwallet"
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
)
@@ -1497,14 +1498,14 @@ func (b *BreachArbitrator) createSweepTx(inputs ...input.Input) (*wire.MsgTx,
spendableOutputs = append(spendableOutputs, inp)
}
txWeight := int64(weightEstimate.Weight())
txWeight := weightEstimate.Weight()
return b.sweepSpendableOutputsTxn(txWeight, spendableOutputs...)
}
// sweepSpendableOutputsTxn creates a signed transaction from a sequence of
// spendable outputs by sweeping the funds into a single p2wkh output.
func (b *BreachArbitrator) sweepSpendableOutputsTxn(txWeight int64,
func (b *BreachArbitrator) sweepSpendableOutputsTxn(txWeight lntypes.WeightUnit,
inputs ...input.Input) (*wire.MsgTx, error) {
// First, we obtain a new public key script from the wallet which we'll