Changeset View
Changeset View
Standalone View
Standalone View
test/functional/wallet_multiwallet.py
Show First 20 Lines • Show All 277 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
# filepath) | # filepath) | ||||
assert_raises_rpc_error( | assert_raises_rpc_error( | ||||
-4, | -4, | ||||
"Wallet file verification failed. Error loading wallet wallet.dat. Duplicate -wallet filename specified.", | "Wallet file verification failed. Error loading wallet wallet.dat. Duplicate -wallet filename specified.", | ||||
self.nodes[0].loadwallet, | self.nodes[0].loadwallet, | ||||
'wallet.dat') | 'wallet.dat') | ||||
# Fail to load if one wallet is a copy of another | # Fail to load if one wallet is a copy of another | ||||
assert_raises_rpc_error(-1, "BerkeleyBatch: Can't open database w8_copy (duplicates fileid", | assert_raises_rpc_error(-4, "BerkeleyBatch: Can't open database w8_copy (duplicates fileid", | ||||
self.nodes[0].loadwallet, 'w8_copy') | self.nodes[0].loadwallet, 'w8_copy') | ||||
# Fail to load if one wallet is a copy of another. | # Fail to load if one wallet is a copy of another. | ||||
# Test this twice to make sure that we don't re-introduce | # Test this twice to make sure that we don't re-introduce | ||||
# https://github.com/bitcoin/bitcoin/issues/14304 | # https://github.com/bitcoin/bitcoin/issues/14304 | ||||
assert_raises_rpc_error(-1, "BerkeleyBatch: Can't open database w8_copy (duplicates fileid", | assert_raises_rpc_error(-4, "BerkeleyBatch: Can't open database w8_copy (duplicates fileid", | ||||
self.nodes[0].loadwallet, 'w8_copy') | self.nodes[0].loadwallet, 'w8_copy') | ||||
# Fail to load if wallet file is a symlink | # Fail to load if wallet file is a symlink | ||||
if os.name != 'nt': | if os.name != 'nt': | ||||
assert_raises_rpc_error( | assert_raises_rpc_error( | ||||
-4, | -4, | ||||
"Wallet file verification failed. Invalid -wallet path 'w8_symlink'", | "Wallet file verification failed. Invalid -wallet path 'w8_symlink'", | ||||
self.nodes[0].loadwallet, | self.nodes[0].loadwallet, | ||||
▲ Show 20 Lines • Show All 102 Lines • Show Last 20 Lines |