-
Notifications
You must be signed in to change notification settings - Fork 491
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
phonebook: Persist initial phonebook peers; remove unused ExtendPeerList #5615
phonebook: Persist initial phonebook peers; remove unused ExtendPeerList #5615
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5615 +/- ##
==========================================
+ Coverage 54.95% 54.97% +0.01%
==========================================
Files 460 460
Lines 64446 64447 +1
==========================================
+ Hits 35417 35430 +13
+ Misses 26653 26643 -10
+ Partials 2376 2374 -2
... and 15 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
If I remember right, it does not replace but merges. Otherwise |
All occurrences in the repo according to github search: SRV updates use this to replace peer list on refresh. Replace peer list on ws network create--which is where the -p overrides get passed in. |
This sounds like a buggy behavior for me. |
I agree that we probably want clear semantics on the |
We'll need Extend function for this... |
46900ad
to
afacc28
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine.
PR description no longer matches content but otherwise LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocking this, looks like folks think it should use replace logic with preserving seeded entries.
That sounds like it should be done in a separate PR, but if we can't merge this without it then I can add it here. |
If we merge as is then dead relays could appear be in phonebook, not end of the world but still. This PR is just 5 LoC and the new fix will touch the same code, so I suggest to fix it right here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM -- I like the property based testing
Summary
We never actually call ExtendPeerList anywhere. When we refresh the SRV list periodically it just fully replaces the peer list.
Test Plan
grep'ing ExtendPeerList shows nothing. Also existing tests should pass.
Info
Resolves #5545