Add -overridednsseed for testing DNS seed behavior
Summary:
This makes it easier to test both the node fetching seeds
from a particular seeder and a seeder fetching peers from a particular node.
Test Plan:
ninja check
Test node fetching seeds from a specific seeder:
bitcoind -overridednsseed=seed.bitcoinabc.org
Should see this in the logs:
2020-12-14T18:01:03Z Loading addresses from DNS seed seed.bitcoinabc.org 2020-12-14T18:01:03Z 24 addresses found from DNS seeds
Test seeder fetching peers from a specific node:
./bitcoind ./bitcoin-seeder -host=localhost -ns=localhost -port=8888 -mbox=noemail@bitcoinabc.org -wipeban -wipeignore -overridednsseed=localhost
After some time, the seeder should report many peers:
[20-12-14 10:29:17] 0/482 available (4 tried in 8s, 147 new, 331 active), 0 banned; 0 DNS requests, 0 db queries
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Subscribers: deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D8673