-
Notifications
You must be signed in to change notification settings - Fork 286
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
refactor(core-p2p): Remove unnecessary ping() call #2123
Conversation
- getPeers() is only interested in /peer/list, remove unnecessary ping() invocation from getPeers() - increase ping timeout when accepting new peer - re-enable peer-verification
@air1one @faustbrian @supaiku0 - please review this in the next few days. Be sure to explicitly select labels so I know what's going on. If no reviewer appears after a week, a reminder will be sent out. |
3 separate changes go in this PR. They are related, but can be chopped off in separate PRs. |
@supaiku0 The ci/circleci: test-node10-1 job is failing as of 7252448269ccd27480d73b1040ef2fc975b4f720. Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! |
@vasild tests need adjustment |
Yes, I am looking into this. Looks like the test relied on the side effect of getPeers() calling ping(). I am considering one of the following:
|
Would go with option 2 |
Yes. Another goodie popped out of this: |
acceptNewPeer() will call ping(), thus avoiding a peers without a state in the list of peers. After this change addPeer() is unused and has been removed.
Codecov Report
@@ Coverage Diff @@
## develop #2123 +/- ##
===========================================
+ Coverage 79.33% 79.35% +0.01%
===========================================
Files 329 329
Lines 7921 7889 -32
Branches 1141 1096 -45
===========================================
- Hits 6284 6260 -24
+ Misses 1604 1597 -7
+ Partials 33 32 -1
Continue to review full report at Codecov.
|
getPeers() is only interested in /peer/list, remove unnecessary ping()
invocation from getPeers()
increase ping timeout when accepting new peer
re-enable peer-verification
Proposed changes
Types of changes
Checklist