Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/test_node.py
Show First 20 Lines • Show All 77 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): | ||||
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 | ||||
self.default_args = ["-datadir=" + self.datadir, "-logtimemicros", "-debug", "-debugexclude=libevent", | self.default_args = [ | ||||
"-debugexclude=leveldb", "-mocktime=" + str(mocktime), "-uacomment=" + self.name] | "-datadir=" + self.datadir, | ||||
"-logtimemicros", | |||||
"-debug", | |||||
"-debugexclude=libevent", | |||||
"-debugexclude=leveldb", | |||||
"-mocktime=" + str(mocktime), | |||||
"-uacomment=" + self.name, | |||||
"-noprinttoconsole", | |||||
] | |||||
if not os.path.isfile(bitcoin_cli): | if not os.path.isfile(bitcoin_cli): | ||||
raise FileNotFoundError( | raise FileNotFoundError( | ||||
"Binary '{}' could not be found.\nTry setting it manually:\n\tBITCOINCLI=<path/to/bitcoin-cli> {}".format(bitcoin_cli, sys.argv[0])) | "Binary '{}' could not be found.\nTry setting it manually:\n\tBITCOINCLI=<path/to/bitcoin-cli> {}".format(bitcoin_cli, sys.argv[0])) | ||||
self.cli = TestNodeCLI(bitcoin_cli, self.datadir) | self.cli = TestNodeCLI(bitcoin_cli, self.datadir) | ||||
self.use_cli = use_cli | self.use_cli = use_cli | ||||
self.running = False | self.running = False | ||||
▲ Show 20 Lines • Show All 390 Lines • Show Last 20 Lines |