Changeset View
Changeset View
Standalone View
Standalone View
test/functional/wallet_multiwallet.py
Show First 20 Lines • Show All 215 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
# Fail to load if wallet doesn't exist | # Fail to load if wallet doesn't exist | ||||
assert_raises_rpc_error(-18, 'Wallet wallets not found.', | assert_raises_rpc_error(-18, 'Wallet wallets not found.', | ||||
self.nodes[0].loadwallet, 'wallets') | self.nodes[0].loadwallet, 'wallets') | ||||
# Fail to load duplicate wallets | # Fail to load duplicate wallets | ||||
assert_raises_rpc_error(-4, 'Wallet file verification failed: Error loading wallet w1. Duplicate -wallet filename specified.', | assert_raises_rpc_error(-4, 'Wallet file verification failed: Error loading wallet w1. Duplicate -wallet filename specified.', | ||||
self.nodes[0].loadwallet, wallet_names[0]) | self.nodes[0].loadwallet, wallet_names[0]) | ||||
# Fail to load duplicate wallets by different ways (directory and filepath) | |||||
assert_raises_rpc_error(-4, "Wallet file verification failed: Error loading wallet wallet.dat. Duplicate -wallet filename specified.", | |||||
self.nodes[0].loadwallet, '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(-1, "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 https://github.com/bitcoin/bitcoin/issues/14304 | # Test this twice to make sure that we don't re-introduce 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(-1, "BerkeleyBatch: Can't open database w8_copy (duplicates fileid", | ||||
self.nodes[0].loadwallet, 'w8_copy') | self.nodes[0].loadwallet, 'w8_copy') | ||||
▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines |