mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-11 08:42:56 +02:00
sweep: pass dustLimit to CreateSweepTx
This commit is contained in:
@@ -83,14 +83,18 @@ type txInputSet struct {
|
||||
wallet Wallet
|
||||
}
|
||||
|
||||
func dustLimit(relayFee chainfee.SatPerKWeight) btcutil.Amount {
|
||||
return txrules.GetDustThreshold(
|
||||
input.P2WPKHSize,
|
||||
btcutil.Amount(relayFee.FeePerKVByte()),
|
||||
)
|
||||
}
|
||||
|
||||
// newTxInputSet constructs a new, empty input set.
|
||||
func newTxInputSet(wallet Wallet, feePerKW,
|
||||
relayFee chainfee.SatPerKWeight, maxInputs int) *txInputSet {
|
||||
|
||||
dustLimit := txrules.GetDustThreshold(
|
||||
input.P2WPKHSize,
|
||||
btcutil.Amount(relayFee.FeePerKVByte()),
|
||||
)
|
||||
dustLimit := dustLimit(relayFee)
|
||||
|
||||
state := txInputSetState{
|
||||
weightEstimate: newWeightEstimator(feePerKW),
|
||||
|
Reference in New Issue
Block a user