You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
dash-spv: peers turned away for their ping block every refill #1553
Candidates turned away at admission for a slow or missing handshake ping (Supervisor::repair_round, dash-spv/src/network/manager.rs) are closed through stash_backups, which records them with PeerDiscoverer::probed. PeerDiscoverer::get then hands out every probed address before any untried one.
A refill for one empty slot asks for 1 + DIAL_MARGIN = 3 candidates. Once three candidates have been turned away, every refill batch is those three. They are never banned, because their dial succeeded, so get removes them and stash_backups puts them straight back. A usable peer that was never tried is never dialed and the client stays below max_peers. Swap rounds also ask for 3 and get stuck the same way.
In a test on dev with 3 slots, two good peers, three peers whose pong takes 2 s and one usable untried peer, the three slow peers were each dialed 32 times in a minute and the usable peer 0 times.
Fix: remember whether a probed peer was turned away, and hand those out only after the untried addresses.
Activity