diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-08-05 10:54:44 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-08-16 10:34:01 -0400 |
commit | fa31dc1bf4ee471c4641eef8de02702ba0619ae7 (patch) | |
tree | 4b77c531e2824db42ee78416e2c340b1a58cdb02 /test/functional/test_framework/util.py | |
parent | aed15edf179d75f4835da499de8c97a76120bcb4 (diff) |
test: Pass down correct chain name in tests
Diffstat (limited to 'test/functional/test_framework/util.py')
-rw-r--r-- | test/functional/test_framework/util.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py index 3d9be0d0a6..7e8020cceb 100644 --- a/test/functional/test_framework/util.py +++ b/test/functional/test_framework/util.py @@ -283,14 +283,22 @@ def initialize_datadir(dirname, n, chain): datadir = get_datadir_path(dirname, n) if not os.path.isdir(datadir): os.makedirs(datadir) + # Translate chain name to config name + if chain == 'testnet3': + chain_name_conf_arg = 'testnet' + chain_name_conf_section = 'test' + else: + chain_name_conf_arg = chain + chain_name_conf_section = chain with open(os.path.join(datadir, "bitcoin.conf"), 'w', encoding='utf8') as f: - f.write("{}=1\n".format(chain)) - f.write("[{}]\n".format(chain)) + f.write("{}=1\n".format(chain_name_conf_arg)) + f.write("[{}]\n".format(chain_name_conf_section)) 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("dnsseed=0\n") f.write("listenonion=0\n") f.write("printtoconsole=0\n") os.makedirs(os.path.join(datadir, 'stderr'), exist_ok=True) |