-
Notifications
You must be signed in to change notification settings - Fork 115
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
go/p2p/rpc: Refactor rpc calls #5007
Conversation
6ca42e4
to
b797444
Compare
Codecov Report
@@ Coverage Diff @@
## master #5007 +/- ##
==========================================
- Coverage 66.68% 66.62% -0.07%
==========================================
Files 478 478
Lines 51800 51868 +68
==========================================
+ Hits 34544 34556 +12
- Misses 12983 13041 +58
+ Partials 4273 4271 -2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it 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.
Can you also backport the memory leak and peer scoring fixes?
When method CallMulti finishes early, the requests in progress are canceled and unfairly recorded as failed. Furthermore, the result channel is never cleared neither closed which leaves one go routine hanging.
1aefc95
to
b548870
Compare
Peer selection is very tightly coupled with RPC client as peer manager is constructed inside client's constructor. We also miss simple RPC calls which contact exactly one peer.
Test
Memory leak was check with the following code, which prints 1 and 101, meaning that 100 go routines leaked.