-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: minor improvements to available neighbouring peer search (#3598)
Description --- - Removes peers that were previously offline; a connection was re-attempted and fails. - Instead of attempting to replace a disconnected peer in the neighbouring and random peer pools, attempt to reconnect to the disconnected peer. If that fails, the peer is replaced. - neighbouring peers ordered by last seen (based on @mikethetike 's PR #2817) - Xor distance uses u128 (based on @mikethetike 's PR #2817) - add cooldown if encountering many failed connection attempts from DHT pool peers - add last_seen directly to peer (w/ migration) Motivation and Context --- By removing peers from the peer manager when offline, the number of peers stored on the network should gradually decrease. This will only happen once all/most peers are upgraded. How Has This Been Tested? --- Memorynet Manually, base node operates normally and peer list reduces (until peer sync pulls more in again from nodes without this change)
- Loading branch information
Showing
35 changed files
with
774 additions
and
877 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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.