cnct: reuse sweep tx logic for success resolver

This commit is contained in:
Joost Jager
2018-09-26 11:00:10 -07:00
parent c1d845aa0d
commit 6977d59e35
3 changed files with 98 additions and 77 deletions

View File

@@ -118,6 +118,13 @@ func (s *UtxoSweeper) CreateSweepTx(inputs []Input,
)
cltvCount++
// An HTLC on the commitment transaction of the remote party,
// that can be swept with the preimage.
case lnwallet.HtlcAcceptedRemoteSuccess:
weightEstimate.AddWitnessInput(
lnwallet.OfferedHtlcSuccessWitnessSize,
)
default:
unknownCount++
log.Warnf("kindergarten output in nursery store "+