HomePhabricator

Remove TestNode()

Description

Remove TestNode()

Summary:
TestNode() already takes in the majority of CServiceResult and only has one call site.
In addition, having it located in seeder/bitcoin.* when the call site is in seeder/main.cpp
make banning logic more complex and difficult to follow.

Test Plan:
Edit chainparams.cpp such that the only seed for TestNet is localhost.

./bitcoind -whitelist=127.0.0.1 --datadir=testdir -listen=1 -connect=0 -debug=net -datadir=testdir
./bitcoin-seeder -host=localhost -ns=blah.bitframe.org -port=8888 -mbox=info@bitframe.org --testnet --wipeban --wipeignore

Confirm seeder successfully connects with the local node and then connects to the peers obtained by the local node.
Output should start as:

0/2 available (0 tried in 0s, 0 new, 2 active), 0 banned; 0 DNS requests, 0 db queries

Then eventually become something like:

1/581 available (3 tried in 4s, 546 new, 32 active), 0 banned; 0 DNS requests, 0 db queries

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, jasonbcox

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, jasonbcox

Subscribers: jasonbcox

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

Details

Provenance
nakihitoAuthored on Apr 20 2020, 23:53
nakihitoPushed on Apr 22 2020, 21:49
Reviewer
Restricted Owners Package
Differential Revision
D5800: Remove TestNode()
Parents
rSTAGINGd61d1020d2fc: [build-configurations] Add build-without-cli
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/19042