HomePhabricator

Integrate gArgs and chainparams into the Seeder

Description

Integrate gArgs and chainparams into the Seeder

Summary:
Replaces getopts() with gArgs.
Because ArgsManager does not seem to support both long and short
options and because it also reserves the -h option for help message
requests, the seeder's options have all been changed to long-form. This
is also more inline with our other code (for example, see bitcoind.cpp).

This patch also integrates chainparams with the seeder.

Release notes have been added and the Seeder's README file have
been edited to reflect this these changes.

Test Plan:

make
ninja
bitcoin-seeder -help
bitcoin-seeder -h
bitcoin-seeder -?
bitcoin-seeder -h --help-debug

These should all output the seeder help message. The last line should print the same but also include the -regtest option help text.

./bitcoin-seeder -host=seeder.bitframe.org -ns=dev.bitframe.org -port=5364 -mbox=info@bitframe.org -testnet -filter=1,5 -wipeignore -wipeban -threads=95 -dnsthreads=5

This should start the seeder with the following lines:

Supporting whitelisted filters: 0x1,0x5
Using test.
Loading dnsseed.dat...Ban list wiped...Ignore list wiped...done
Starting 5 DNS threads for seeder.bitframe.org on dev.bitframe.org (port 5364)........done
Starting seeder...done
Starting 95 crawler threads...done
...

The third line above will only output if there is already a dnsseed.dat file in the directory the seeder is run from.
The second line from the top should reflect the selected chainparams:
main by default
test for testnet
regtest for regtest

bitcoin-seeder -jire=5

This should error out with the following message:

Error parsing command line arguments: Invalid parameter -jire

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix, Fabien, jasonbcox

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix, jasonbcox

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

Details

Provenance
nakihitoAuthored on Oct 14 2019, 21:41
nakihitoPushed on Dec 4 2019, 23:02
Reviewer
Restricted Owners Package
Differential Revision
D4300: Integrate gArgs and chainparams into the Seeder
Parents
rABC5cf580f0f756: Various nits in cuckoocache_tests.cpp
Branches
Unknown
Tags
Unknown