Skip to content

Commit

Permalink
Set -discover=0 in regtest framework
Browse files Browse the repository at this point in the history
The regtest framework is local, so often there is no need to
discover our external IP.  Setting -discover=0 in util.py works
around shutdown hang caused by GetExternalIP waiting in recv().
  • Loading branch information
dgenr8 committed Jul 13, 2014
1 parent 29ef389 commit cdf305e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qa/rpc-tests/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def initialize_chain(test_dir):
# Create cache directories, run bitcoinds:
for i in range(4):
datadir=initialize_datadir("cache", i)
args = [ "bitcoind", "-keypool=1", "-datadir="+datadir ]
args = [ "bitcoind", "-keypool=1", "-datadir="+datadir, "-discover=0" ]
if i > 0:
args.append("-connect=127.0.0.1:"+str(p2p_port(0)))
bitcoind_processes[i] = subprocess.Popen(args)
Expand Down Expand Up @@ -147,7 +147,7 @@ def start_node(i, dir, extra_args=None, rpchost=None):
Start a bitcoind and return RPC connection to it
"""
datadir = os.path.join(dir, "node"+str(i))
args = [ "bitcoind", "-datadir="+datadir, "-keypool=1" ]
args = [ "bitcoind", "-datadir="+datadir, "-keypool=1", "-discover=0" ]
if extra_args is not None: args.extend(extra_args)
bitcoind_processes[i] = subprocess.Popen(args)
devnull = open("/dev/null", "w+")
Expand Down

0 comments on commit cdf305e

Please sign in to comment.