aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-11-17 11:22:01 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-11-17 11:25:08 +0100
commit09481eec887fde9771db7fcf2cae510cf730bf21 (patch)
tree0860c47937f953b8b828c2490ffb33a4b8a04bdb
parent409e9ef04cae479cda547500dfb1937633275b49 (diff)
parenta7af9839d688bee9b0b15add61259140b3c00014 (diff)
Merge pull request #5282
a7af983 don't override dir() in qa rpc tests (Bryan Bishop)
-rw-r--r--qa/rpc-tests/util.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py
index e5383b6c57..0d5eeefa79 100644
--- a/qa/rpc-tests/util.py
+++ b/qa/rpc-tests/util.py
@@ -61,8 +61,8 @@ def sync_mempools(rpc_connections):
bitcoind_processes = {}
-def initialize_datadir(dir, n):
- datadir = os.path.join(dir, "node"+str(n))
+def initialize_datadir(dirname, n):
+ datadir = os.path.join(dirname, "node"+str(n))
if not os.path.isdir(datadir):
os.makedirs(datadir)
with open(os.path.join(datadir, "bitcoin.conf"), 'w') as f:
@@ -145,11 +145,11 @@ def _rpchost_to_args(rpchost):
rv += ['-rpcport=' + rpcport]
return rv
-def start_node(i, dir, extra_args=None, rpchost=None):
+def start_node(i, dirname, extra_args=None, rpchost=None):
"""
Start a bitcoind and return RPC connection to it
"""
- datadir = os.path.join(dir, "node"+str(i))
+ datadir = os.path.join(dirname, "node"+str(i))
args = [ os.getenv("BITCOIND", "bitcoind"), "-datadir="+datadir, "-keypool=1", "-discover=0" ]
if extra_args is not None: args.extend(extra_args)
bitcoind_processes[i] = subprocess.Popen(args)
@@ -163,15 +163,15 @@ def start_node(i, dir, extra_args=None, rpchost=None):
proxy.url = url # store URL on proxy for info
return proxy
-def start_nodes(num_nodes, dir, extra_args=None, rpchost=None):
+def start_nodes(num_nodes, dirname, extra_args=None, rpchost=None):
"""
Start multiple bitcoinds, return RPC connections to them
"""
if extra_args is None: extra_args = [ None for i in range(num_nodes) ]
- return [ start_node(i, dir, extra_args[i], rpchost) for i in range(num_nodes) ]
+ return [ start_node(i, dirname, extra_args[i], rpchost) for i in range(num_nodes) ]
-def log_filename(dir, n_node, logname):
- return os.path.join(dir, "node"+str(n_node), "regtest", logname)
+def log_filename(dirname, n_node, logname):
+ return os.path.join(dirname, "node"+str(n_node), "regtest", logname)
def stop_node(node, i):
node.stop()