HomePhabricator

[net/refactor] Rework ThreadOpenConnections logic

Description

[net/refactor] Rework ThreadOpenConnections logic

Summary:

Make the connection counts explicit and extract into interface functions
around m_conn_type. Using explicit counting and switch statements where
possible should help prevent counting bugs in the future.

Partial backport (16/19) of core PR19316:
https://github.com/bitcoin/bitcoin/pull/19316/commits/7f7b83deb2427599c129f4ff581d4d045461e459

Depends on D8725.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Subscribers: majcosta

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

Details

Provenance
Amiti Uttarwar <amiti@uttarwar.org>Authored on Jun 3 2020, 04:23
FabienCommitted on Dec 21 2020, 15:56
FabienPushed on Dec 21 2020, 15:58
Reviewer
Restricted Project
Differential Revision
D8726: [net/refactor] Rework ThreadOpenConnections logic
Parents
rABCa0d96686f592: [net] Fix bug where AddrFetch connections would be counted as outbound full…
Branches
Unknown
Tags
Unknown