aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p_dns_seeds.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/p2p_dns_seeds.py')
-rwxr-xr-xtest/functional/p2p_dns_seeds.py13
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.