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

protocols/kad/behaviour: Use HashSet to deduplicate GetProviders #1528

Merged
merged 1 commit into from Mar 31, 2020

Conversation

mxinden
Copy link
Member

@mxinden mxinden commented Mar 30, 2020

Given that the order of PeerIds within the GetProvidersOk.providers
set is irrelevant but duplication is at best confusing this commit makes
use of a HashSet instead of a Vec to return unique PeerIds only.


Fixes #1507.

Given that the order of `PeerId`s within the `GetProvidersOk.providers`
set is irrelevant but duplication is at best confusing this commit makes
use of a `HashSet` instead of a `Vec` to return unique `PeerId`s only.
@romanb romanb merged commit 2296a87 into libp2p:master Mar 31, 2020
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.

GetProvidersResult should return unique providers
2 participants