diff options
author | Amiti Uttarwar <amiti@uttarwar.org> | 2021-05-24 15:56:32 -0700 |
---|---|---|
committer | Amiti Uttarwar <amiti@uttarwar.org> | 2021-07-30 11:15:49 -0700 |
commit | 35851450a928ffacca240fadbf1747a42d5ba256 (patch) | |
tree | 68b404cca8d717f6afed4ac1922b5b5fcef5f718 /test | |
parent | 75c05af361552eeecd100cee8cc40d4cd5a3aa27 (diff) | |
download | bitcoin-35851450a928ffacca240fadbf1747a42d5ba256.tar.xz |
[test] Test the interactions between -connect and -dnsseed
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/p2p_dns_seeds.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/functional/p2p_dns_seeds.py b/test/functional/p2p_dns_seeds.py index b58607a5c9..213741f3a8 100755 --- a/test/functional/p2p_dns_seeds.py +++ b/test/functional/p2p_dns_seeds.py @@ -15,9 +15,22 @@ class P2PDNSSeeds(BitcoinTestFramework): self.extra_args = [["-dnsseed=1"]] def run_test(self): + self.init_arg_tests() self.existing_outbound_connections_test() self.existing_block_relay_connections_test() + def init_arg_tests(self): + fakeaddr = "fakenodeaddr.fakedomain.invalid." + + self.log.info("Check that setting -connect disables -dnsseed by default") + self.nodes[0].stop_node() + with self.nodes[0].assert_debug_log(expected_msgs=["DNS seeding disabled"]): + self.start_node(0, [f"-connect={fakeaddr}"]) + + self.log.info("Check that running -connect and -dnsseed means DNS logic runs.") + with self.nodes[0].assert_debug_log(expected_msgs=["Loading addresses from DNS seed"], timeout=12): + self.restart_node(0, [f"-connect={fakeaddr}", "-dnsseed=1"]) + def existing_outbound_connections_test(self): # Make sure addrman is populated to enter the conditional where we # delay and potentially skip DNS seeding. |