wallet: Remove path checking code from loadwallet RPC

This commit does not change behavior except for error messages which now
include more complete information.
This commit is contained in:
Russell Yanofsky
2020-08-04 20:58:43 -04:00
parent 8b5e7297c0
commit a987438e9d
3 changed files with 13 additions and 15 deletions

View File

@ -129,7 +129,8 @@ class RpcCreateMultiSigTest(BitcoinTestFramework):
try:
node1.loadwallet('wmulti')
except JSONRPCException as e:
if e.error['code'] == -18 and 'Wallet wmulti not found' in e.error['message']:
path = os.path.join(self.options.tmpdir, "node1", "regtest", "wallets", "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:
raise