diff options
author | Jon Atack <jon@atack.com> | 2021-02-20 17:17:26 +0100 |
---|---|---|
committer | Jon Atack <jon@atack.com> | 2021-03-19 20:13:04 +0100 |
commit | caa21f586f951d626a67f391050c3644f1057f57 (patch) | |
tree | 22f586682a41742f4d39b6194981b5ae6bec4257 /build-aux/m4/ax_check_compile_flag.m4 | |
parent | 8f1a53eb027727a4c0eaac6d82f0a8279549f638 (diff) |
Protect onion+localhost peers in ProtectEvictionCandidatesByRatio()
Now that we have a reliable way to detect inbound onion peers, this commit
updates our existing eviction protection of 1/4 localhost peers to instead
protect up to 1/4 onion peers (connected via our tor control service), sorted by
longest uptime. Any remaining slots of the 1/4 are then allocated to protect
localhost peers, or 2 localhost peers if no slots remain and 2 or more onion
peers are protected, sorted by longest uptime.
The goal is to avoid penalizing onion peers, due to their higher min ping times
relative to IPv4 and IPv6 peers, and improve our diversity of peer connections.
Thank you to Gregory Maxwell, Suhas Daftuar, Vasil Dimov and Pieter Wuille
for valuable review feedback that shaped the direction.
Diffstat (limited to 'build-aux/m4/ax_check_compile_flag.m4')
0 files changed, 0 insertions, 0 deletions