Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/test_node.py
Show All 31 Lines | class TestNode(): | ||||
- state about the node (whether it's running, etc) | - state about the node (whether it's running, etc) | ||||
- a Python subprocess.Popen object representing the running process | - a Python subprocess.Popen object representing the running process | ||||
- an RPC connection to the node | - an RPC connection to the node | ||||
To make things easier for the test writer, a bit of magic is happening under the covers. | To make things easier for the test writer, a bit of magic is happening under the covers. | ||||
Any unrecognised messages will be dispatched to the RPC connection.""" | Any unrecognised messages will be dispatched to the RPC connection.""" | ||||
def __init__(self, i, dirname, extra_args, rpchost, timewait, binary, stderr, mocktime, coverage_dir): | def __init__(self, i, dirname, extra_args, rpchost, p2p_port, timewait, binary, stderr, mocktime, coverage_dir): | ||||
self.index = i | self.index = i | ||||
self.datadir = os.path.join(dirname, "node" + str(i)) | self.datadir = os.path.join(dirname, "node" + str(i)) | ||||
self.rpchost = rpchost | self.rpchost = rpchost | ||||
self.p2p_port = p2p_port | |||||
self.name = "testnode-{}".format(i) | self.name = "testnode-{}".format(i) | ||||
if timewait: | if timewait: | ||||
self.rpc_timeout = timewait | self.rpc_timeout = timewait | ||||
else: | else: | ||||
# Wait for up to 60 seconds for the RPC server to respond | # Wait for up to 60 seconds for the RPC server to respond | ||||
self.rpc_timeout = 60 | self.rpc_timeout = 60 | ||||
if binary is None: | if binary is None: | ||||
self.binary = os.getenv("BITCOIND", "bitcoind") | self.binary = os.getenv("BITCOIND", "bitcoind") | ||||
▲ Show 20 Lines • Show All 175 Lines • Show Last 20 Lines |