qa: Use node.datadir instead of tmpdir in test framework

This commit is contained in:
MarcoFalke
2018-01-02 08:57:27 -05:00
parent 93634f296e
commit c8330d4216
13 changed files with 74 additions and 71 deletions

View File

@@ -284,7 +284,7 @@ def rpc_url(datadir, i, rpchost=None):
################
def initialize_datadir(dirname, n):
datadir = os.path.join(dirname, "node" + str(n))
datadir = get_datadir_path(dirname, n)
if not os.path.isdir(datadir):
os.makedirs(datadir)
with open(os.path.join(datadir, "bitcoin.conf"), 'w', encoding='utf8') as f:
@@ -300,8 +300,7 @@ def initialize_datadir(dirname, n):
def get_datadir_path(dirname, n):
return os.path.join(dirname, "node" + str(n))
def append_config(dirname, n, options):
datadir = get_datadir_path(dirname, n)
def append_config(datadir, options):
with open(os.path.join(datadir, "bitcoin.conf"), 'a', encoding='utf8') as f:
for option in options:
f.write(option + "\n")