sweep: pass dustLimit to CreateSweepTx
This commit is contained in:
6 files changed
+30
-21
No files matched your search
@@ -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