This repository has been archived by the owner on Oct 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix!: only discover bootstrap peers once and tag them on discovery (#142
) Bootstrap peers should be used in an intial DHT self query to find peers that are KAD-close to us. We do not need to rediscover the same peers over and over again, instead we should just discover them once, use them to query for peers near our PeerId then we can disconnect from them like any other peer 1. Instead of "discovering" the same peers every few seconds, only discover them once 2. Tag the peers in the peer store with an expiring value to prevent any potential connection being culled before we've used the bootstrap nodes to query for peers close to us BREAKING CHANGE: the `interval` option has been renamed `timeout` and peers are now only discovered once
- Loading branch information
1 parent
15f9302
commit cd41d94
Showing
6 changed files
with
186 additions
and
76 deletions.
There are no files selected for viewing
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.