HomePhabricator

[net] Fix bug where AddrFetch connections would be counted as outbound full…

Description

[net] Fix bug where AddrFetch connections would be counted as outbound full relay

Summary:

The desired logic is for us to only open feeler connections after we
have hit the max count for outbound full relay connections.  A short
lived AddrFetch connection (previously called oneshot) could cause
ThreadOpenConnections to miscount and mistakenly open a feeler instead
of full relay.

Partial backport (15/19) of core PR19316:
https://github.com/bitcoin/bitcoin/pull/19316/commits/35839e963bf61d2da0d12f5b8cea74ac0e0fbd7b

Depends on D8724.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

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

Details

Provenance
Amiti Uttarwar <amiti@uttarwar.org>Authored on Jun 2 2020, 16:01
FabienCommitted on Dec 21 2020, 15:55
FabienPushed on Dec 21 2020, 15:57
Reviewer
Restricted Project
Differential Revision
D8725: [net] Fix bug where AddrFetch connections would be counted as outbound full relay
Parents
rABCa2e090891001: [net/refactor] Clarify logic for selecting connections in ThreadOpenConnections
Branches
Unknown
Tags
Unknown