HomePhabricator

Extract ProtectEvictionCandidatesByRatio from SelectNodeToEvict

Description

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

Details

Provenance
Jon Atack <jon@atack.com>Authored on Feb 21 2021, 20:42
PiRKCommitted on Feb 4 2022, 10:59
PiRKPushed on Feb 4 2022, 10:59
Reviewer
Restricted Project
Differential Revision
D10975: Extract ProtectEvictionCandidatesByRatio from SelectNodeToEvict
Parents
rABC6f628bcb1267: Increase our max number of outbound peers
Branches
Unknown
Tags
Unknown