Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/test_node.py
Show First 20 Lines • Show All 69 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): | ||||
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 != 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 flexibity, they can access the | # For those callers that need more flexibity, 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 | |||||
# initialize_datadir) | |||||
self.extra_args = extra_args | self.extra_args = extra_args | ||||
self.default_args = ["-datadir=" + self.datadir, "-server", "-keypool=1", "-discover=0", "-rest", "-logtimemicros", | self.default_args = ["-datadir=" + self.datadir, "-logtimemicros", "-debug", "-debugexclude=libevent", | ||||
"-debug", "-debugexclude=libevent", "-debugexclude=leveldb", "-mocktime=" + str(mocktime), "-uacomment=" + self.name] | "-debugexclude=leveldb", "-mocktime=" + str(mocktime), "-uacomment=" + self.name] | ||||
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 327 Lines • Show Last 20 Lines |