aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_multiwallet.py
diff options
context:
space:
mode:
authorpablomartin4btc <pablomartin4btc@gmail.com>2023-01-29 17:48:49 -0300
committerpablomartin4btc <pablomartin4btc@gmail.com>2024-09-17 16:22:12 -0300
commit54227e681a4efa8961f1ad05d43366d88a9b686a (patch)
tree8bf1303cb46b3e31400d754f0bb2a46e571274a3 /test/functional/wallet_multiwallet.py
parent225718eda89d65a7041c33e1994d3bf7bd71bbdd (diff)
rpc, cli: improve error message on multiwallet mode
The primary objective is to provide users with clearer and more informative error messages when encountering the RPC_WALLET_NOT_SPECIFIED error, which occurs when multiple wallets are loadad. This commit also rectifies the error message consistency by bringing the error message in line with the definition established in protocol.h ("error when there are multiple wallets loaded").
Diffstat (limited to 'test/functional/wallet_multiwallet.py')
-rwxr-xr-xtest/functional/wallet_multiwallet.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/wallet_multiwallet.py b/test/functional/wallet_multiwallet.py
index 156f4279b4..149b1246d8 100755
--- a/test/functional/wallet_multiwallet.py
+++ b/test/functional/wallet_multiwallet.py
@@ -229,7 +229,7 @@ class MultiWalletTest(BitcoinTestFramework):
assert_raises_rpc_error(-18, "Requested wallet does not exist or is not loaded", wallet_bad.getwalletinfo)
# accessing wallet RPC without using wallet endpoint fails
- assert_raises_rpc_error(-19, "Wallet file not specified", node.getwalletinfo)
+ assert_raises_rpc_error(-19, "Multiple wallets are loaded. Please select which wallet", node.getwalletinfo)
w1, w2, w3, w4, *_ = wallets
self.generatetoaddress(node, nblocks=COINBASE_MATURITY + 1, address=w1.getnewaddress(), sync_fun=self.no_op)
@@ -275,7 +275,7 @@ class MultiWalletTest(BitcoinTestFramework):
loadwallet_name = node.loadwallet(wallet_names[1])
assert_equal(loadwallet_name['name'], wallet_names[1])
assert_equal(node.listwallets(), wallet_names[0:2])
- assert_raises_rpc_error(-19, "Wallet file not specified", node.getwalletinfo)
+ assert_raises_rpc_error(-19, "Multiple wallets are loaded. Please select which wallet", node.getwalletinfo)
w2 = node.get_wallet_rpc(wallet_names[1])
w2.getwalletinfo()