HomePhabricator

Refactor p2p_add_connections

Description

Refactor p2p_add_connections

Summary:
This makes the code much easier to follow by avoiding a log of p2p_idx manipulations, and make it easier to changes the number of connections in the future without having to update the whole test.

Ref T1696.

Test Plan:

./test/functional/test_runner.py p2p_add_connections

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Maniphest Tasks: T1696

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

Details

Provenance
FabienAuthored on Feb 3 2022, 10:27
FabienPushed on Feb 3 2022, 13:56
Reviewer
Restricted Project
Differential Revision
D10972: Refactor p2p_add_connections
Parents
rABCcbe8f6a3a058: net: assert CNode::m_inbound_onion is inbound in ctor, add getter, unit tests
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task