Skip to content

Commit 20dc7f2

Browse files
committed
multi: fix typo and add comment.
1 parent 328a711 commit 20dc7f2

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

contractcourt/htlc_timeout_resolver.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -461,19 +461,23 @@ func (h *htlcTimeoutResolver) Resolve(
461461
return h.claimCleanUp(commitSpend)
462462
}
463463

464-
log.Infof("%T(%v): resolving htlc with incoming fail msg, fully "+
465-
"confirmed", h, h.htlcResolution.ClaimOutpoint)
466-
467464
// At this point, the second-level transaction is sufficiently
468465
// confirmed, or a transaction directly spending the output is.
469466
// Therefore, we can now send back our clean up message, failing the
470467
// HTLC on the incoming link.
468+
//
469+
// NOTE: This can be called twice if the outgoing resolver restarts
470+
// before the second-stage timeout transaction is confirmed.
471+
log.Infof("%T(%v): resolving htlc with incoming fail msg, "+
472+
"fully confirmed", h, h.htlcResolution.ClaimOutpoint)
473+
471474
failureMsg := &lnwire.FailPermanentChannelFailure{}
472-
if err := h.DeliverResolutionMsg(ResolutionMsg{
475+
err = h.DeliverResolutionMsg(ResolutionMsg{
473476
SourceChan: h.ShortChanID,
474477
HtlcIndex: h.htlc.HtlcIndex,
475478
Failure: failureMsg,
476-
}); err != nil {
479+
})
480+
if err != nil {
477481
return nil, err
478482
}
479483

htlcswitch/switch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1632,7 +1632,7 @@ out:
16321632
defer s.wg.Done()
16331633

16341634
if err := s.FlushForwardingEvents(); err != nil {
1635-
log.Errorf("unable to flush "+
1635+
log.Errorf("Unable to flush "+
16361636
"forwarding events: %v", err)
16371637
}
16381638
}()

0 commit comments

Comments
 (0)