Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more information when a co-op close is failing. #8090

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions htlcswitch/link.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions peer/brontide.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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")
Expand Down