lnwallet: properly use delayKey for htlc-timeout tx in newHtlcResolution
This commit fixes an existing bug when crafting the HTLC resolution in the face of a commitment broadcast. Previously, we we’re using the localKey which is incorrect, as directly below we properly use the delayKey when crafting the secondLevelHtlcScript to sign.
This commit is contained in:
parent
8a682d9ec3
commit
21782374c9
@ -3431,7 +3431,7 @@ func newHtlcResolution(signer Signer, localChanCfg *channeldb.ChannelConfig,
|
|||||||
// transaction.
|
// transaction.
|
||||||
timeoutTx, err := createHtlcTimeoutTx(op, secondLevelOutputAmt,
|
timeoutTx, err := createHtlcTimeoutTx(op, secondLevelOutputAmt,
|
||||||
htlc.RefundTimeout, uint32(localChanCfg.CsvDelay),
|
htlc.RefundTimeout, uint32(localChanCfg.CsvDelay),
|
||||||
revokeKey, localKey,
|
revokeKey, delayKey,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
Reference in New Issue
Block a user