Changeset View
Changeset View
Standalone View
Standalone View
test/functional/wallet_multiwallet.py
Show First 20 Lines • Show All 150 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
"Error: -zapwallettxes is only allowed with a single wallet file") | "Error: -zapwallettxes is only allowed with a single wallet file") | ||||
self.nodes[0].assert_start_raises_init_error( | self.nodes[0].assert_start_raises_init_error( | ||||
[ | [ | ||||
'-zapwallettxes=2', | '-zapwallettxes=2', | ||||
'-wallet=w1', | '-wallet=w1', | ||||
'-wallet=w2'], | '-wallet=w2'], | ||||
"Error: -zapwallettxes is only allowed with a single wallet file") | "Error: -zapwallettxes is only allowed with a single wallet file") | ||||
self.log.info("Do not allow -salvagewallet with multiwallet") | |||||
self.nodes[0].assert_start_raises_init_error( | |||||
[ | |||||
'-salvagewallet', | |||||
'-wallet=w1', | |||||
'-wallet=w2'], | |||||
"Error: -salvagewallet is only allowed with a single wallet file") | |||||
self.nodes[0].assert_start_raises_init_error( | |||||
[ | |||||
'-salvagewallet=1', | |||||
'-wallet=w1', | |||||
'-wallet=w2'], | |||||
"Error: -salvagewallet is only allowed with a single wallet file") | |||||
# if wallets/ doesn't exist, datadir should be the default wallet dir | # if wallets/ doesn't exist, datadir should be the default wallet dir | ||||
wallet_dir2 = data_dir('walletdir') | wallet_dir2 = data_dir('walletdir') | ||||
os.rename(wallet_dir(), wallet_dir2) | os.rename(wallet_dir(), wallet_dir2) | ||||
self.start_node(0, ['-wallet=w4', '-wallet=w5']) | self.start_node(0, ['-wallet=w4', '-wallet=w5']) | ||||
assert_equal(set(node.listwallets()), {"w4", "w5"}) | assert_equal(set(node.listwallets()), {"w4", "w5"}) | ||||
w5 = wallet("w5") | w5 = wallet("w5") | ||||
node.generatetoaddress(nblocks=1, address=w5.getnewaddress()) | node.generatetoaddress(nblocks=1, address=w5.getnewaddress()) | ||||
▲ Show 20 Lines • Show All 236 Lines • Show Last 20 Lines |