utxonursery: use proper weight estimation for second-level spends

This commit is contained in:
Olaoluwa Osuntokun 2018-01-20 20:37:03 -08:00
parent 96fbc7da84
commit d368bce1da
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

@ -938,7 +938,7 @@ func (u *utxoNursery) createSweepTx(kgtnOutputs []kidOutput,
// sweep. // sweep.
case lnwallet.HtlcOfferedTimeoutSecondLevel: case lnwallet.HtlcOfferedTimeoutSecondLevel:
weightEstimate.AddWitnessInput( weightEstimate.AddWitnessInput(
lnwallet.OfferedHtlcTimeoutWitnessSize, lnwallet.SecondLevelHtlcSuccessWitnessSize,
) )
csvOutputs = append(csvOutputs, input) csvOutputs = append(csvOutputs, input)
@ -947,7 +947,7 @@ func (u *utxoNursery) createSweepTx(kgtnOutputs []kidOutput,
// sweep. // sweep.
case lnwallet.HtlcAcceptedSuccessSecondLevel: case lnwallet.HtlcAcceptedSuccessSecondLevel:
weightEstimate.AddWitnessInput( weightEstimate.AddWitnessInput(
lnwallet.AcceptedHtlcSuccessWitnessSize, lnwallet.SecondLevelHtlcSuccessWitnessSize,
) )
csvOutputs = append(csvOutputs, input) csvOutputs = append(csvOutputs, input)