input+sweep: let weightestimator take known TxOut

This commit is contained in:
Johan T. Halseth committed 2020-11-20 13:06:53 +01:00
1 parent efd6bc9501
commit 3d209059c1
3 files changed
+47

No files matched your search

+8
View File
@@ -533,6 +533,14 @@ func (twe *TxWeightEstimator) AddNestedP2WSHInput(witnessSize int) *TxWeightEsti
return twe
}
// AddTxOutput adds a known TxOut to the weight estimator.
func (twe *TxWeightEstimator) AddTxOutput(txOut *wire.TxOut) *TxWeightEstimator {
twe.outputSize += txOut.SerializeSize()
twe.outputCount++
return twe
}
// AddP2PKHOutput updates the weight estimate to account for an additional P2PKH
// output.
func (twe *TxWeightEstimator) AddP2PKHOutput() *TxWeightEstimator {