mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-11 12:03:04 +02:00
qa: Use node.datadir instead of tmpdir in test framework
This commit is contained in:
@@ -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")
|
||||
|
Reference in New Issue
Block a user