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:
Olaoluwa Osuntokun 2017-09-26 18:31:15 -07:00
parent 8a682d9ec3
commit 21782374c9
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

@ -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