multi: fix typo and add comment.

This commit is contained in:
ziggie committed 2024-11-07 18:32:45 +01:00
1 parent 328a711dbe
commit 20dc7f29f8
2 files changed
+10 -6

No files matched your search

+9 -5
View File
@@ -461,19 +461,23 @@ func (h *htlcTimeoutResolver) Resolve(
return h.claimCleanUp(commitSpend) 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 // At this point, the second-level transaction is sufficiently
// confirmed, or a transaction directly spending the output is. // confirmed, or a transaction directly spending the output is.
// Therefore, we can now send back our clean up message, failing the // Therefore, we can now send back our clean up message, failing the
// HTLC on the incoming link. // 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{} failureMsg := &lnwire.FailPermanentChannelFailure{}
if err := h.DeliverResolutionMsg(ResolutionMsg{ err = h.DeliverResolutionMsg(ResolutionMsg{
SourceChan: h.ShortChanID, SourceChan: h.ShortChanID,
HtlcIndex: h.htlc.HtlcIndex, HtlcIndex: h.htlc.HtlcIndex,
Failure: failureMsg, Failure: failureMsg,
}); err != nil { })
if err != nil {
return nil, err return nil, err
} }
+1 -1
View File
@@ -1632,7 +1632,7 @@ out:
defer s.wg.Done() defer s.wg.Done()
if err := s.FlushForwardingEvents(); err != nil { if err := s.FlushForwardingEvents(); err != nil {
log.Errorf("unable to flush "+ log.Errorf("Unable to flush "+
"forwarding events: %v", err) "forwarding events: %v", err)
} }
}() }()