peersync: Keep connected peers in listpeers#431
Draft
YusukeShimizu wants to merge 1 commit into
Draft
Conversation
05edebb to
0953094
Compare
Keep peers that are still connected according to the lightning backend out of stale peersync cleanup. Request a fresh poll from connected peers that are missing from the store, and persist peer capability data from REQUEST_POLL messages so the store refreshes on both halves of the peersync handshake. Add regression coverage for connected-but-expired peers, rediscovery of connected peers missing from the store, and REQUEST_POLL persistence.
0953094 to
4c738bf
Compare
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.
Fixes #425.
pscli listpeersis backed by peersync state, not only by LND's active peer/channel state. A peer could therefore be removed from the peersync store by stale cleanup when its last peersync observation aged out, even if the lightning backend still reported the peer as connected.This matches the issue timing: peerswapd started around 05:48, and the peer disappeared around 08:49. With the previous cleanup cadence, a peer observed shortly after startup could be dropped later by peersync cleanup despite still being active in LND.