This repository has been archived by the owner on Nov 6, 2020. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DevP2p: Get node IP address and udp port from Socket, if not included in PING packet #10705
DevP2p: Get node IP address and udp port from Socket, if not included in PING packet #10705
Changes from 6 commits
fb102a7
351b257
706dceb
783a66d
9400dd1
2056d6e
56e9eb3
cd43652
2633494
cdf80c5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Shouldn't it be
is_valid_bootnode
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.
endpoint.is_valid_sync_node == endpoint.is_valid
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.
Well that's kind of my point. Here we are receiving neighbors, and I guess it would be possible that some of those are actually bootnodes. I didn't think of that earlier, but here I think you should revisit
let endpoint = NodeEndpoint::from_rlp(&r)?;
andendpoint.is_valid_sync_node
to take this case into account: we want to add those to our discovery list, without adding them to our syncing list.