File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 }()
You can’t perform that action at this time.
0 commit comments