Extract ProtectEvictionCandidatesByRatio from SelectNodeToEvict
Summary:
to allow deterministic unit testing of the ratio-based peer eviction protection
logic, which protects peers having longer connection times and those connected
via higher-latency networks.
Add documentation.
This is a backport of core#20197 [1/6]
https://github.com/bitcoin/bitcoin/pull/20197/commits/f126cbd6de6e1a8fee0e900ecfbc14a88e362541
Depends on D10973
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D10975