multi: fix typo and add comment.

This commit is contained in:
ziggie
2024-10-17 13:25:45 +02:00
parent 328a711dbe
commit 20dc7f29f8
2 changed files with 10 additions and 6 deletions

View File

@@ -461,19 +461,23 @@ func (h *htlcTimeoutResolver) Resolve(
return h.claimCleanUp(commitSpend)
}
log.Infof("%T(%v): resolving htlc with incoming fail msg, fully "+
"confirmed", h, h.htlcResolution.ClaimOutpoint)
// At this point, the second-level transaction is sufficiently
// confirmed, or a transaction directly spending the output is.
// Therefore, we can now send back our clean up message, failing the
// HTLC on the incoming link.
//
// NOTE: This can be called twice if the outgoing resolver restarts
// before the second-stage timeout transaction is confirmed.
log.Infof("%T(%v): resolving htlc with incoming fail msg, "+
"fully confirmed", h, h.htlcResolution.ClaimOutpoint)
failureMsg := &lnwire.FailPermanentChannelFailure{}
if err := h.DeliverResolutionMsg(ResolutionMsg{
err = h.DeliverResolutionMsg(ResolutionMsg{
SourceChan: h.ShortChanID,
HtlcIndex: h.htlc.HtlcIndex,
Failure: failureMsg,
}); err != nil {
})
if err != nil {
return nil, err
}