Skip to content
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

network.addBootNode: Check for pong before follup requests #695

Merged
merged 2 commits into from
Dec 18, 2024

Conversation

ScottyPoi
Copy link
Collaborator

BaseNetwork method addBootNode first Pings a boodnode, then sends FindNodes request for non-full buckets.

This method was missing a conditional which first checked if the PING was successful or not (PONG received). This led to many unnecessary requests being sent towards peers we already knew to be unresponsive.

This adds the necessary conditional (if pong !== undefined) {...}, and also corrects the requests to seek nodes from non-full buckets, not just empty buckets.

Copy link
Collaborator

@acolytec3 acolytec3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@acolytec3 acolytec3 merged commit a6a25c3 into master Dec 18, 2024
5 checks passed
@acolytec3 acolytec3 deleted the addbootnode-fix branch December 18, 2024 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants