aboutsummaryrefslogtreecommitdiff
path: root/src/chainparams.cpp
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-08-03 10:49:31 +0800
committerfanquake <fanquake@gmail.com>2021-08-03 11:21:15 +0800
commit10fbb37268123d0e9e8cdfa88f125726d101a756 (patch)
tree58b3c9fdd6c6c00eb748bcf8df91bf9859acd05b /src/chainparams.cpp
parent06788c67058495b9aa4044e1512f0af53d186c7e (diff)
parent82b6f89819e55af26f5264678e0f93052934bcb3 (diff)
downloadbitcoin-10fbb37268123d0e9e8cdfa88f125726d101a756.tar.xz
Merge bitcoin/bitcoin#22098: [test, init] DNS seed querying logic
82b6f89819e55af26f5264678e0f93052934bcb3 [style] Small style improvements to DNS parameters (Amiti Uttarwar) 4c89e24f64c1dc1a56a3bcb6b5e2b4fb95e8b29f [test] Test the delay before querying DNS seeds (Amiti Uttarwar) 6395c8ed5689ea72e9a1618f14551775246f6361 [test] Test the interactions between -forcednsseed and -dnsseed (Amiti Uttarwar) 6f6b7df6bdcf863af160c0426e3a22028ca8259a [init] Disallow starting up with conflicting paramters for -dnsseed and -forcednsseed (Amiti Uttarwar) 26d0ffe4f2573e0297c9b0e095c2a0868929b08b [test] Test -forcednsseed causes querying DNS seeds (Amiti Uttarwar) 35851450a928ffacca240fadbf1747a42d5ba256 [test] Test the interactions between -connect and -dnsseed (Amiti Uttarwar) 75c05af361552eeecd100cee8cc40d4cd5a3aa27 [test] Test logic to query DNS seeds with block-relay-only connections (Amiti Uttarwar) 9c0871977839c28636eff975748182888299cd2b [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: ACK 82b6f89819e55af26f5264678e0f93052934bcb3 jnewbery: reACK 82b6f89819e55af26f5264678e0f93052934bcb3 Tree-SHA512: 9f0c29bfbf99426727e79c0a25606ae09deab91a92e3c5cee7f84c3ca7503a8ac9ab85a85c51841d40b164ef8c991326070f0b2f41d075fb7985df26f6e95d6d
Diffstat (limited to 'src/chainparams.cpp')
-rw-r--r--src/chainparams.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index a8b45685d0..74463f347d 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -435,7 +435,8 @@ public:
assert(genesis.hashMerkleRoot == uint256S("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"));
vFixedSeeds.clear(); //!< Regtest mode doesn't have any fixed seeds.
- vSeeds.clear(); //!< Regtest mode doesn't have any DNS seeds.
+ vSeeds.clear();
+ vSeeds.emplace_back("dummySeed.invalid.");
fDefaultConsistencyChecks = true;
fRequireStandard = true;