test: Use TestNode *_path properties where possible

Seems odd to place the burden on test writers to hardcode the chain or
datadir path for the nodes under test.
This commit is contained in:
MarcoFalke committed 2023-06-21 08:49:18 +02:00
1 parent dddd89962b
commit aaaa3aefbd
22 files changed
+86 -108

No files matched your search

+1 -1
View File
@@ -158,7 +158,7 @@ class RpcCreateMultiSigTest(BitcoinTestFramework):
try:
node1.loadwallet('wmulti')
except JSONRPCException as e:
path = os.path.join(self.options.tmpdir, "node1", "regtest", "wallets", "wmulti")
path = self.nodes[1].wallets_path / "wmulti"
if e.error['code'] == -18 and "Wallet file verification failed. Failed to load database path '{}'. Path does not exist.".format(path) in e.error['message']:
node1.createwallet(wallet_name='wmulti', disable_private_keys=True)
else: