This PR adds a DNS seed to the regtest chain params to enable testing the DNS seed querying logic of CConnman::ThreadDNSAddressSeed
and relevant startup parameters. Adds coverage for the changes in #22013 (and then some).
The main behavioral change to bitcoind is that this PR disallows starting up with conflicting parameters for -dnsseed
and -forcednsseed
.
The tests include:
- parameter interactions of different combinations of
-connect
,-dnsseed
and-forcednsseed
- the delay before querying DNS seeds depending on how many addresses are in the addrman
- the behavior of
-forcednsseed
- skipping DNS querying if we have outbound full relay connections & not block-relay-only connections
Huge props to mzumsande for identifying the timing technique for testing successful connections before running ThreadDNSAddressSeed
ππ½