[test] Introduce test logic to query DNS seeds

This commit introduces a DNS seed to the regest chain params in order to add
coverage to the DNS querying logic.

The first test checks that we do not query DNS seeds if we are able to
succesfully connect to 2 outbound connections. Since we participate in ADDR
relay with those connections, including sending a GETADDR message during the
VERSION handshake, querying the DNS seeds is unnecessary.

Co-authored-by: Martin Zumsande <mzumsande@gmail.com>
This commit is contained in:
Amiti Uttarwar
2021-05-28 13:45:15 -07:00
parent b295395664
commit 9c08719778
4 changed files with 40 additions and 3 deletions

View File

@@ -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;