-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
P1MUST be fixed or reviewedMUST be fixed or reviewedchannel closingRelated to the closing of channels cooperatively and uncooperativelyRelated to the closing of channels cooperatively and uncooperativelyspec
Milestone
Description
Today when we receive a shutdown requests, we'll remove the link from the switch entirely also (
Lines 2695 to 2701 in ddeccf8
| // Optimistically try a link shutdown, erroring out if it | |
| // failed. | |
| if err := p.tryLinkShutdown(chanID); err != nil { | |
| peerLog.Errorf("failed link shutdown: %v", err) | |
| req.Err <- err | |
| return | |
| } |
readHandler. This was fine when we wanted to not process any further updates, but breaks down given that the spec requires (being updated to make this more clear) that one still process updateFee messages after a shutdown has been sent (but before the first closing signed).
What we should still remove the link from the switch and send out a disable, but we need to special case for the sig+revoke and UpdateFee messages when we're in this state. One way to do this (given we already have the channel struct at that point) would be to manually feed in these messages into the channel state machine.
Steps To Completion
- Update the
readHandlerloop to send any update messages post channel close into the chan closer - Have the chan close then manually apply only the
UpdateFeemessage, generating the corresponding messages needed to fully lock in the change.
Metadata
Metadata
Assignees
Labels
P1MUST be fixed or reviewedMUST be fixed or reviewedchannel closingRelated to the closing of channels cooperatively and uncooperativelyRelated to the closing of channels cooperatively and uncooperativelyspec