11
11
import tempfile
12
12
import time
13
13
14
+ from test_framework .netutil import UNREACHABLE_PROXY_ARG
14
15
from test_framework .test_framework import BitcoinTestFramework
15
16
from test_framework .test_node import ErrorMatch
16
17
from test_framework import util
@@ -227,8 +228,8 @@ def test_invalid_command_line_options(self):
227
228
)
228
229
229
230
def test_log_buffer (self ):
230
- with self .nodes [0 ].assert_debug_log (expected_msgs = ['Warning: parsed potentially confusing double-negative -connect =0\n ' ]):
231
- self .start_node (0 , extra_args = ['-noconnect =0' ])
231
+ with self .nodes [0 ].assert_debug_log (expected_msgs = ['Warning: parsed potentially confusing double-negative -listen =0\n ' ]):
232
+ self .start_node (0 , extra_args = ['-nolisten =0' ])
232
233
self .stop_node (0 )
233
234
234
235
def test_args_log (self ):
@@ -259,6 +260,7 @@ def test_args_log(self):
259
260
'-rpcpassword=' ,
260
261
'-rpcuser=secret-rpcuser' ,
261
262
'-torpassword=secret-torpassword' ,
263
+ UNREACHABLE_PROXY_ARG ,
262
264
])
263
265
self .stop_node (0 )
264
266
@@ -307,7 +309,7 @@ def test_seed_peers(self):
307
309
],
308
310
timeout = 10 ,
309
311
):
310
- self .start_node (0 , extra_args = ['-dnsseed=1' , '-fixedseeds=1' , f'-mocktime={ start } ' ])
312
+ self .start_node (0 , extra_args = ['-dnsseed=1' , '-fixedseeds=1' , f'-mocktime={ start } ' , UNREACHABLE_PROXY_ARG ])
311
313
312
314
# Only regtest has no fixed seeds. To avoid connections to random
313
315
# nodes, regtest is the only network where it is safe to enable
@@ -355,7 +357,7 @@ def test_seed_peers(self):
355
357
],
356
358
timeout = 10 ,
357
359
):
358
- self .start_node (0 , extra_args = ['-dnsseed=0' , '-fixedseeds=1' , '-addnode=fakenodeaddr' , f'-mocktime={ start } ' ])
360
+ self .start_node (0 , extra_args = ['-dnsseed=0' , '-fixedseeds=1' , '-addnode=fakenodeaddr' , f'-mocktime={ start } ' , UNREACHABLE_PROXY_ARG ])
359
361
with self .nodes [0 ].assert_debug_log (expected_msgs = [
360
362
"Adding fixed seeds as 60 seconds have passed and addrman is empty" ,
361
363
]):
@@ -371,18 +373,18 @@ def test_connect_with_seednode(self):
371
373
# When -connect is supplied, expanding addrman via getaddr calls to ADDR_FETCH(-seednode)
372
374
# nodes is irrelevant and -seednode is ignored.
373
375
with self .nodes [0 ].assert_debug_log (expected_msgs = seednode_ignored ):
374
- self .start_node (0 , extra_args = ['-connect=fakeaddress1' , '-seednode=fakeaddress2' ])
376
+ self .start_node (0 , extra_args = ['-connect=fakeaddress1' , '-seednode=fakeaddress2' , UNREACHABLE_PROXY_ARG ])
375
377
376
378
# With -proxy, an ADDR_FETCH connection is made to a peer that the dns seed resolves to.
377
379
# ADDR_FETCH connections are not used when -connect is used.
378
380
with self .nodes [0 ].assert_debug_log (expected_msgs = dnsseed_ignored ):
379
- self .restart_node (0 , extra_args = ['-connect=fakeaddress1' , '-dnsseed=1' , '-proxy=1.2.3.4' ])
381
+ self .restart_node (0 , extra_args = ['-connect=fakeaddress1' , '-dnsseed=1' , UNREACHABLE_PROXY_ARG ])
380
382
381
383
# If the user did not disable -dnsseed, but it was soft-disabled because they provided -connect,
382
384
# they shouldn't see a warning about -dnsseed being ignored.
383
385
with self .nodes [0 ].assert_debug_log (expected_msgs = addcon_thread_started ,
384
386
unexpected_msgs = dnsseed_ignored ):
385
- self .restart_node (0 , extra_args = ['-connect=fakeaddress1' , '-proxy=1.2.3.4' ])
387
+ self .restart_node (0 , extra_args = ['-connect=fakeaddress1' , UNREACHABLE_PROXY_ARG ])
386
388
387
389
# We have to supply expected_msgs as it's a required argument
388
390
# The expected_msg must be something we are confident will be logged after the unexpected_msg
0 commit comments