aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework/util.py
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2017-06-02 14:30:36 -0400
committerJohn Newbery <john@johnnewbery.com>2017-08-15 13:12:15 -0400
commit7897338918dac072e788b8ab2919d4559f311bef (patch)
treee514317914448eaf783a2b5b980ba9339895bbdb /test/functional/test_framework/util.py
parente526ca6284b9e13be1b912b80dd73a34e739b539 (diff)
downloadbitcoin-7897338918dac072e788b8ab2919d4559f311bef.tar.xz
[tests] Introduce TestNode
TestNode is a class responsible for all state related to a bitcoind node under test. It stores local state, is responsible for tracking the bitcoind process and delegates unrecognised messages to the RPC connection. This commit changes start_nodes and stop_nodes to start and stop the bitcoind nodes in parallel, making test setup and teardown much faster.
Diffstat (limited to 'test/functional/test_framework/util.py')
-rw-r--r--test/functional/test_framework/util.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py
index acca72aa86..4098fd8615 100644
--- a/test/functional/test_framework/util.py
+++ b/test/functional/test_framework/util.py
@@ -204,7 +204,7 @@ def rpc_port(n):
return PORT_MIN + PORT_RANGE + n + (MAX_NODES * PortSeed.n) % (PORT_RANGE - 1 - MAX_NODES)
def rpc_url(datadir, i, rpchost=None):
- rpc_u, rpc_p = get_auth_cookie(datadir, i)
+ rpc_u, rpc_p = get_auth_cookie(datadir)
host = '127.0.0.1'
port = rpc_port(i)
if rpchost:
@@ -232,7 +232,7 @@ def initialize_datadir(dirname, n):
def get_datadir_path(dirname, n):
return os.path.join(dirname, "node" + str(n))
-def get_auth_cookie(datadir, n):
+def get_auth_cookie(datadir):
user = None
password = None
if os.path.isfile(os.path.join(datadir, "bitcoin.conf")):