-
Notifications
You must be signed in to change notification settings - Fork 871
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
Change map key in eth peers #3383
Conversation
Signed-off-by: Stefan Pingel <[email protected]>
Signed-off-by: Stefan Pingel <[email protected]>
@pinges hey all good ? when this PR will be fixed and merged, any time estimation? I have in my network one peer duplicated 1088 times :). |
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.
Other than the aesthetics mentioned in my comment, this is good.
@@ -118,8 +120,8 @@ private void abortPendingRequestsAssignedToDisconnectedPeers() { | |||
} | |||
} | |||
|
|||
public EthPeer peer(final PeerConnection peerConnection) { |
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.
I don't think the public interface method to this class needs a type change. It's fine to make the internal map keyed by Bytes
, but I think the public interface method into EthPeers
gets less readable when we make the parameter more primitive. Can we keep the
parameter as a PeerConnection
, and just interact with the Map using its getPeer().getId()
?
@pinges are you closing this PR in favour of your new approach? |
Closing this in favour of a new approach cc @pinges |
Trying to fix multiple connections to the same peer by using the peer id as the key to the map