Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

feat: ping old DHT peers before eviction #229

Merged
merged 3 commits into from
Oct 6, 2021

Conversation

achingbrain
Copy link
Member

Updates the DHT contact logic to ping the old peers when buckets are full and only evict if the peer does not respond.

Runs ping requests in a queue to prevent flooding the network if lots and lots of peers are added very quickly.

Uses the generic libp2p ping, rather than the DHT RPC ping, I'm not sure if this is correct. It looks like go-libp2p-kad-dht just tries to dial the remote peer and treats that as success, so maybe this should just do that?

Updates the DHT contact logic to ping the old peers when buckets are
full and only evict if the peer does not respond.
@achingbrain
Copy link
Member Author

Going to merge this as further refactoring is necessary as part of #233

@achingbrain achingbrain merged commit eff54bf into master Oct 6, 2021
@achingbrain achingbrain deleted the feat/ping-old-dht-peers-before-eviction branch October 6, 2021 06:30
@BigLep BigLep linked an issue Nov 13, 2021 that may be closed by this pull request
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Peer eviction strategy
1 participant