sweep: allow specified outputs to sweep tx

We'll use this to attach an output for the value reserved for anchor
commitments fee bumping if the user requests a send_all transaction.
This commit is contained in:
Johan T. Halseth committed 2021-01-19 10:53:45 +01:00
1 parent eaf97418be
commit 185ba77f8e
7 files changed
+80 -33

No files matched your search

+3 -3
View File
@@ -1192,8 +1192,8 @@ func (s *UtxoSweeper) sweep(inputs inputSet, feeRate chainfee.SatPerKWeight,
// Create sweep tx.
tx, err := createSweepTx(
inputs, s.currentOutputScript, uint32(currentHeight), feeRate,
dustLimit(s.relayFeeRate), s.cfg.Signer,
inputs, nil, s.currentOutputScript, uint32(currentHeight),
feeRate, dustLimit(s.relayFeeRate), s.cfg.Signer,
)
if err != nil {
return fmt.Errorf("create sweep tx: %v", err)
@@ -1487,7 +1487,7 @@ func (s *UtxoSweeper) CreateSweepTx(inputs []input.Input, feePref FeePreference,
}
return createSweepTx(
inputs, pkScript, currentBlockHeight, feePerKw,
inputs, nil, pkScript, currentBlockHeight, feePerKw,
dustLimit(s.relayFeeRate), s.cfg.Signer,
)
}