fix: Prevent dialing connected peers#662
Merged
mergify[bot] merged 9 commits intosigp:release-v1.0.0from Oct 8, 2025
Merged
Conversation
Member
|
IMO a better fix would be modifying |
dknopik
reviewed
Oct 8, 2025
Comment on lines
68
to
74
| pub fn track_subnet_peers( | ||
| subnet_id: SubnetId, | ||
| needed_subnets: &mut HashSet<SubnetId>, | ||
| peer_store: &MemoryStore<Enr>, | ||
| connection_manager: &ConnectionManager, | ||
| blocked_peers: &HashSet<PeerId>, | ||
| ) -> ConnectActions { | ||
| needed_subnets.insert(subnet_id); | ||
|
|
||
| Self::determine_actions_for_subnets( |
Comment on lines
74
to
78
| self.needed_subnets.insert(subnet_id); | ||
|
|
||
| PeerDiscovery::track_subnet_peers( | ||
| subnet_id, | ||
| &mut self.needed_subnets, | ||
| self.peer_store.store(), |
Member
Author
|
Yeah it's unrelated. It's this commit: I put this in intentionally because I just saw it and figured it didn't deserve its own PR. Can remove into its own PR if you prefer |
Member
|
Let's do it separately, I believe the way it is currently was intentional during @diegomrsantos' refactoring of the peer manager, so it might be worthwhile to discuss this |
17 tasks
petarjuki7
pushed a commit
to petarjuki7/anchor
that referenced
this pull request
Oct 16, 2025
The logs were indicating that we were dialing already connected peers. This PR filters out already connected peers from the list of discovered peers. It improves the logging so that we can more easily identify our peer count, ie if we are just continually discovering already connected peers. Co-Authored-By: Age Manning <Age@AgeManning.com> Co-Authored-By: Daniel Knopik <daniel@dknopik.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue Addressed
The logs were indicating that we were dialing already connected peers.
This PR filters out already connected peers from the list of discovered peers. It improves the logging so that we can more easily identify our peer count, ie if we are just continually discovering already connected peers.