-
Notifications
You must be signed in to change notification settings - Fork 839
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
Increase node diversity when downloading blocks #2033
Increase node diversity when downloading blocks #2033
Conversation
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
LOG.debug("Downloading block {} from peers {}.", hash, peers.stream().map(EthPeer::toString)); | ||
final Optional<EthPeer> peer = | ||
peers.stream().filter(ethPeer -> !triedAndInvalidPeers.contains(ethPeer)).findFirst(); | ||
if (peer.isPresent() && !peer.get().isDisconnected()) { |
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.
If even one peer is disconnected then we stop trying for others as well? I'm working on making this method simpler anyways, I'll show you my changes once I write them up.
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.
Just updated the code thanks to your PR. thanks
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
…-block Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com> Co-authored-by: Ratan Rai Sur <ratan.r.sur@gmail.com> Signed-off-by: Richard Hart <richardhart92@gmail.com>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com> Co-authored-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Signed-off-by: Karim TAAM karim.t2am@gmail.com
PR description
As a node operator, I don't want to see "Failed to download block 0xhex from peer 0xhex..." message from the same node over and over. I want to see besu fail over to another node and try again rather than failing from the same node
Tes performed
Changelog