From e4dd9117787d1957b2b7dfafdd339b122387d435 Mon Sep 17 00:00:00 2001 From: ziggie Date: Thu, 12 Oct 2023 11:05:01 +0200 Subject: [PATCH] multi: clarify co-op closure failures. --- htlcswitch/link.go | 4 ++++ peer/brontide.go | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/htlcswitch/link.go b/htlcswitch/link.go index 46aee939d..2a1e49923 100644 --- a/htlcswitch/link.go +++ b/htlcswitch/link.go @@ -1267,6 +1267,10 @@ func (l *channelLink) htlcManager() { return } + l.log.Infof("Channel is in an unclean state " + + "(lingering updates), graceful shutdown of " + + "channel link not possible") + // Otherwise, the channel has lingering updates, send // an error and continue. req.err <- ErrLinkFailedShutdown diff --git a/peer/brontide.go b/peer/brontide.go index 041776ea9..12ea39cf3 100644 --- a/peer/brontide.go +++ b/peer/brontide.go @@ -2982,7 +2982,10 @@ func (p *Brontide) handleLocalCloseReq(req *htlcswitch.ChanClose) { // failed. if err := p.tryLinkShutdown(chanID); err != nil { p.log.Errorf("failed link shutdown: %v", err) - req.Err <- err + + req.Err <- fmt.Errorf("failed handling co-op closing "+ + "request with (try force closing "+ + "it instead): %w", err) return } @@ -3683,8 +3686,8 @@ func (p *Brontide) handleCloseMsg(msg *closeMsg) { func (p *Brontide) HandleLocalCloseChanReqs(req *htlcswitch.ChanClose) { select { case p.localCloseChanReqs <- req: - p.log.Info("Local close channel request delivered to " + - "peer") + p.log.Info("Local close channel request is going to be " + + "delivered to the peer") case <-p.quit: p.log.Info("Unable to deliver local close channel request " + "to peer")