File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ def run_test(self):
18
18
self .init_arg_tests ()
19
19
self .existing_outbound_connections_test ()
20
20
self .existing_block_relay_connections_test ()
21
+ self .force_dns_test ()
21
22
22
23
def init_arg_tests (self ):
23
24
fakeaddr = "fakenodeaddr.fakedomain.invalid."
@@ -60,6 +61,17 @@ def existing_block_relay_connections_test(self):
60
61
for i in range (2 ):
61
62
self .nodes [0 ].add_outbound_p2p_connection (P2PInterface (), p2p_idx = i , connection_type = "block-relay-only" )
62
63
64
+ def force_dns_test (self ):
65
+ self .log .info ("Check that we query DNS seeds if -forcednsseed param is set" )
66
+
67
+ with self .nodes [0 ].assert_debug_log (expected_msgs = ["Loading addresses from DNS seed" ], timeout = 12 ):
68
+ # -dnsseed defaults to 1 in bitcoind, but 0 in the test framework,
69
+ # so pass it explicitly here
70
+ self .restart_node (0 , ["-forcednsseed" , "-dnsseed=1" ])
71
+
72
+ # Restore default for subsequent tests
73
+ self .restart_node (0 )
74
+
63
75
64
76
if __name__ == '__main__' :
65
77
P2PDNSSeeds ().main ()
You can’t perform that action at this time.
0 commit comments