mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
utxonursery: use symmetric second level htlc witness size
This commit switches over the estimates for htlc success/timeout witness sizes to use a symmetric variable, highlighting their equivalence in size.
This commit is contained in:
parent
ee2f2573c1
commit
381579477c
@ -8,14 +8,14 @@ import (
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/lightningnetwork/lnd/chainntnfs"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
"github.com/lightningnetwork/lnd/lnwallet"
|
||||
"github.com/btcsuite/btcd/blockchain"
|
||||
"github.com/btcsuite/btcd/txscript"
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/btcsuite/btcutil"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/lightningnetwork/lnd/chainntnfs"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
"github.com/lightningnetwork/lnd/lnwallet"
|
||||
)
|
||||
|
||||
// SUMMARY OF OUTPUT STATES
|
||||
@ -962,7 +962,7 @@ func (u *utxoNursery) createSweepTx(kgtnOutputs []kidOutput,
|
||||
// sweep.
|
||||
case lnwallet.HtlcOfferedTimeoutSecondLevel:
|
||||
weightEstimate.AddWitnessInput(
|
||||
lnwallet.SecondLevelHtlcSuccessWitnessSize,
|
||||
lnwallet.ToLocalTimeoutWitnessSize,
|
||||
)
|
||||
csvOutputs = append(csvOutputs, input)
|
||||
|
||||
@ -971,7 +971,7 @@ func (u *utxoNursery) createSweepTx(kgtnOutputs []kidOutput,
|
||||
// sweep.
|
||||
case lnwallet.HtlcAcceptedSuccessSecondLevel:
|
||||
weightEstimate.AddWitnessInput(
|
||||
lnwallet.SecondLevelHtlcSuccessWitnessSize,
|
||||
lnwallet.ToLocalTimeoutWitnessSize,
|
||||
)
|
||||
csvOutputs = append(csvOutputs, input)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user