lightningd: keep peer connected when rejecting a dead channel's reestablish - #9518
Open
daywalker90 wants to merge 1 commit into
Open
daywalker90 wants to merge 1 commit into
daywalker90 wants to merge 1 commit into
Conversation
…ablish
handle_peer_spoke() sent an error for a closed or unknown channel and
then unconditionally disconnected the peer. A node recovering from a
static channel backup reestablishes every channel it recovered,
including ones which have closed since the backup was taken. We
correctly reject the dead one, but hanging up there discards the
reestablishes for its still-live siblings, so we never reply to them
and they stay enabled forever.
Only disconnect if the peer has no other channel which still wants peer
comms.
This is what made "Update examples in doc schemas" intermittently time
out: l3 reestablished its already-closed 120x1x0 before its live
132x1x0, so l3 hung up on l4 and never processed 132x1x0:
tests/autogenerate-rpc-examples.py:1618: in generate_list_examples
wait_for(lambda: [c['active'] for c in l3.rpc.listchannels(c34_2)['channels'] if c['source'] == l3.info['id']] == [False])
ValueError: Timeout while waiting for <lambda>
Changelog-Fixed: lightningd: a node recovering from a static channel backup no longer hangs up on the peer when one of the recovered channels has already closed, so the peer can still close the channels which are still open.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
handle_peer_spoke() sent an error for a closed or unknown channel and then unconditionally disconnected the peer. A node recovering from a static channel backup reestablishes every channel it recovered, including ones which have closed since the backup was taken. We correctly reject the dead one, but hanging up there discards the reestablishes for its still-live siblings, so we never reply to them and they stay enabled forever.
Only disconnect if the peer has no other channel which still wants peer comms.
This is what made "Update examples in doc schemas" intermittently time out: l3 reestablished its already-closed 120x1x0 before its live 132x1x0, so l3 hung up on l4 and never processed 132x1x0:
tests/autogenerate-rpc-examples.py:1618: in generate_list_examples
wait_for(lambda: [c['active'] for c in l3.rpc.listchannels(c34_2)['channels'] if c['source'] == l3.info['id']] == [False])
ValueError: Timeout while waiting for
Changelog-Fixed: lightningd: a node recovering from a static channel backup no longer hangs up on the peer when one of the recovered channels has already closed, so the peer can still close the channels which are still open.