mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
qa: Move common args to bitcoin.conf
This commit is contained in:
parent
d09968f4d0
commit
face7220b7
@ -46,6 +46,7 @@ class RESTTest (BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.setup_clean_chain = True
|
||||
self.num_nodes = 3
|
||||
self.extra_args = [["-rest"]] * self.num_nodes
|
||||
|
||||
def setup_network(self, split=False):
|
||||
super().setup_network()
|
||||
|
@ -392,7 +392,7 @@ class BitcoinTestFramework():
|
||||
# Create cache directories, run bitcoinds:
|
||||
for i in range(MAX_NODES):
|
||||
datadir = initialize_datadir(self.options.cachedir, i)
|
||||
args = [os.getenv("BITCOIND", "bitcoind"), "-server", "-keypool=1", "-datadir=" + datadir, "-discover=0"]
|
||||
args = [os.getenv("BITCOIND", "bitcoind"), "-datadir=" + datadir]
|
||||
if i > 0:
|
||||
args.append("-connect=127.0.0.1:" + str(p2p_port(0)))
|
||||
self.nodes.append(TestNode(i, self.options.cachedir, extra_args=[], rpchost=None, timewait=None, binary=None, stderr=None, mocktime=self.mocktime, coverage_dir=None))
|
||||
|
@ -57,9 +57,11 @@ class TestNode():
|
||||
self.binary = binary
|
||||
self.stderr = stderr
|
||||
self.coverage_dir = coverage_dir
|
||||
# Most callers will just need to add extra args to the standard list below. For those callers that need more flexibity, they can just set the args property directly.
|
||||
# Most callers will just need to add extra args to the standard list below.
|
||||
# For those callers that need more flexibity, they can just set the args property directly.
|
||||
# Note that common args are set in the config file (see initialize_datadir)
|
||||
self.extra_args = extra_args
|
||||
self.args = [self.binary, "-datadir=" + self.datadir, "-server", "-keypool=1", "-discover=0", "-rest", "-logtimemicros", "-debug", "-debugexclude=libevent", "-debugexclude=leveldb", "-mocktime=" + str(mocktime), "-uacomment=testnode%d" % i]
|
||||
self.args = [self.binary, "-datadir=" + self.datadir, "-logtimemicros", "-debug", "-debugexclude=libevent", "-debugexclude=leveldb", "-mocktime=" + str(mocktime), "-uacomment=testnode%d" % i]
|
||||
|
||||
self.cli = TestNodeCLI(os.getenv("BITCOINCLI", "bitcoin-cli"), self.datadir)
|
||||
self.use_cli = use_cli
|
||||
|
@ -291,6 +291,9 @@ def initialize_datadir(dirname, n):
|
||||
f.write("regtest=1\n")
|
||||
f.write("port=" + str(p2p_port(n)) + "\n")
|
||||
f.write("rpcport=" + str(rpc_port(n)) + "\n")
|
||||
f.write("server=1\n")
|
||||
f.write("keypool=1\n")
|
||||
f.write("discover=0\n")
|
||||
f.write("listenonion=0\n")
|
||||
f.write("bind=127.0.0.1\n")
|
||||
return datadir
|
||||
|
Loading…
Reference in New Issue
Block a user