HomePhabricator

Move SetupSeederArgs out of parsing code to make it easier to test

Description

Move SetupSeederArgs out of parsing code to make it easier to test

Summary:
Trying to add more test cases to options_tests.cpp results in errors
due to the way the seeder sets up the ArgsManager on each call to ParseCommandLine.
It doesn't make sense to setup args while parsing anyway, so moving it feels right.

The patch includes adding a test case to demonstrate that the change works as intended.

Test Plan:

ninja check-seeder bitcoin-seeder

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
thonkleAuthored on Jan 14 2022, 00:30
thonklePushed on Jan 19 2022, 18:19
Reviewer
Restricted Owners Package
Differential Revision
D10828: Move SetupSeederArgs out of parsing code to make it easier to test
Parents
rABC9ed55ccf968f: [test] Fix wait condition in disconnect_p2ps
Branches
Unknown
Tags
Unknown