Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/test_node.py
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | def __init__(self, i, datadir, *, host, rpc_port, p2p_port, timewait, bitcoind, bitcoin_cli, mocktime, coverage_dir, extra_conf=None, extra_args=None, use_cli=False): | ||||
self.p2p_port = p2p_port | self.p2p_port = p2p_port | ||||
self.name = "testnode-{}".format(i) | self.name = "testnode-{}".format(i) | ||||
self.rpc_timeout = timewait | self.rpc_timeout = timewait | ||||
self.binary = bitcoind | self.binary = bitcoind | ||||
if not os.path.isfile(self.binary): | if not os.path.isfile(self.binary): | ||||
raise FileNotFoundError( | raise FileNotFoundError( | ||||
"Binary '{}' could not be found.\nTry setting it manually:\n\tBITCOIND=<path/to/bitcoind> {}".format(self.binary, sys.argv[0])) | "Binary '{}' could not be found.\nTry setting it manually:\n\tBITCOIND=<path/to/bitcoind> {}".format(self.binary, sys.argv[0])) | ||||
self.coverage_dir = coverage_dir | self.coverage_dir = coverage_dir | ||||
if extra_conf != None: | if extra_conf is not None: | ||||
append_config(datadir, extra_conf) | append_config(datadir, extra_conf) | ||||
# Most callers will just need to add extra args to the default list | # Most callers will just need to add extra args to the default list | ||||
# below. | # below. | ||||
# For those callers that need more flexibility, they can access the | # For those callers that need more flexibility, they can access the | ||||
# default args using the provided facilities. | # default args using the provided facilities. | ||||
# Note that common args are set in the config file (see | # Note that common args are set in the config file (see | ||||
# initialize_datadir) | # initialize_datadir) | ||||
self.extra_args = extra_args | self.extra_args = extra_args | ||||
▲ Show 20 Lines • Show All 414 Lines • Show Last 20 Lines |