HomePhabricator

Avoid test-before-evict evictions of current peers

Description

Avoid test-before-evict evictions of current peers

Summary:
Outbound peer logic prevents connecting to addresses that we're already
connected to, so prevent inadvertent eviction of current peers via
test-before-evict by checking this condition and marking current peer's
addresses as Good().

Co-authored-by: John Newbery <john@johnnewbery.com>

This is a backport of core#20187 [4/4]
https://github.com/bitcoin/bitcoin/pull/20187/commits/16d9bfc4172b4f6ce24a3cd1a1cfa3933cd26751

Depends on D10696

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D10697

Details

Provenance
Suhas Daftuar <sdaftuar@gmail.com>Authored on Oct 16 2020, 18:05
PiRKCommitted on Dec 21 2021, 07:19
PiRKPushed on Dec 21 2021, 07:19
Reviewer
Restricted Project
Differential Revision
D10697: Avoid test-before-evict evictions of current peers
Parents
rABC811f79967ee2: Call CAddrMan::Good() on block-relay-only peer addresses
Branches
Unknown
Tags
Unknown