input+sweep: let weightestimator take known TxOut
This commit is contained in:
3 files changed
+47
No files matched your search
@@ -2,6 +2,7 @@ package sweep
|
||||
|
||||
import (
|
||||
"github.com/btcsuite/btcd/chaincfg/chainhash"
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/btcsuite/btcutil"
|
||||
"github.com/lightningnetwork/lnd/input"
|
||||
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
|
||||
@@ -92,6 +93,12 @@ func (w *weightEstimator) addP2WKHOutput() {
|
||||
w.estimator.AddP2WKHOutput()
|
||||
}
|
||||
|
||||
// addOutput updates the weight estimate to account for the known
|
||||
// output given.
|
||||
func (w *weightEstimator) addOutput(txOut *wire.TxOut) {
|
||||
w.estimator.AddTxOutput(txOut)
|
||||
}
|
||||
|
||||
// weight gets the estimated weight of the transaction.
|
||||
func (w *weightEstimator) weight() int {
|
||||
return w.estimator.Weight()
|
||||
|
||||
Reference in new issue
Block a user