Neptune-Crypto / neptune-core

anonymous peer-to-peer cash
Apache License 2.0
30 stars 8 forks source link

Only attempt to connect to potential peers N times #265

Open Sword-Smith opened 6 days ago

Sword-Smith commented 6 days ago

The peer discovery protocol shares potential peers between connected peers. Currently, we keep trying to connect to peers and never give up, resulting in warnings in the log. A better solution would be to try to connect N times, maybe 3, and then give up after that, if a connection could not be established.

dan-da commented 5 days ago

105 implemented a system that would lower a peers score with each unsuccessful attempt until it gets soft-banned, after which periodic connection attempts are made and it can become unbanned and eventually improve its standing. It also had various improvements to the scoring system, as it existed at the time.

I will need to review if it makes more sense to bring that pr up to date, or just do a simple ban forever after-3 attempts.