mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Merge bitcoin/bitcoin#22098: [test, init] DNS seed querying logic
82b6f89819[style] Small style improvements to DNS parameters (Amiti Uttarwar)4c89e24f64[test] Test the delay before querying DNS seeds (Amiti Uttarwar)6395c8ed56[test] Test the interactions between -forcednsseed and -dnsseed (Amiti Uttarwar)6f6b7df6bd[init] Disallow starting up with conflicting paramters for -dnsseed and -forcednsseed (Amiti Uttarwar)26d0ffe4f2[test] Test -forcednsseed causes querying DNS seeds (Amiti Uttarwar)35851450a9[test] Test the interactions between -connect and -dnsseed (Amiti Uttarwar)75c05af361[test] Test logic to query DNS seeds with block-relay-only connections (Amiti Uttarwar)9c08719778[test] Introduce test logic to query DNS seeds (Amiti Uttarwar) Pull request description: 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` 🙌🏽 ACKs for top commit: mzumsande: ACK82b6f89819jnewbery: reACK82b6f89819Tree-SHA512: 9f0c29bfbf99426727e79c0a25606ae09deab91a92e3c5cee7f84c3ca7503a8ac9ab85a85c51841d40b164ef8c991326070f0b2f41d075fb7985df26f6e95d6d
This commit is contained in:
@@ -79,9 +79,9 @@ static const int64_t DEFAULT_PEER_CONNECT_TIMEOUT = 60;
|
||||
/** Number of file descriptors required for message capture **/
|
||||
static const int NUM_FDS_MESSAGE_CAPTURE = 1;
|
||||
|
||||
static const bool DEFAULT_FORCEDNSSEED = false;
|
||||
static const bool DEFAULT_DNSSEED = true;
|
||||
static const bool DEFAULT_FIXEDSEEDS = true;
|
||||
static constexpr bool DEFAULT_FORCEDNSSEED{false};
|
||||
static constexpr bool DEFAULT_DNSSEED{true};
|
||||
static constexpr bool DEFAULT_FIXEDSEEDS{true};
|
||||
static const size_t DEFAULT_MAXRECEIVEBUFFER = 5 * 1000;
|
||||
static const size_t DEFAULT_MAXSENDBUFFER = 1 * 1000;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user