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:
1 file changed
+1
-1
+1
-1
@@ -3431,7 +3431,7 @@ func newHtlcResolution(signer Signer, localChanCfg *channeldb.ChannelConfig,
|
||||
// transaction.
|
||||
timeoutTx, err := createHtlcTimeoutTx(op, secondLevelOutputAmt,
|
||||
htlc.RefundTimeout, uint32(localChanCfg.CsvDelay),
|
||||
revokeKey, localKey,
|
||||
revokeKey, delayKey,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in new issue
Block a user