Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: peer connection to stale nodes (tari-project#5579)
Description --- This fixes nodes continuously selecting bad stale nodes as connections and attempting to connect to them. Motivation and Context --- If nodes have bad nodes in their peer database they should not keep trying to connect to them. This will attempt to connect to a node once, and if the node was never online and it tried to connect to the node once, it will ignore the node till the node tries to connect to it first. This stops the problem with if a node has too many stale connections in its peer database, it will keep selecting stale nodes and try to connect to them. If the amount of stale nodes are too much, it can cause a constant read/write on the peer database of the node. How Has This Been Tested? --- Manually verified with database with mostly stale nodes. Node will try them once, then ignore them.
- Loading branch information