From 907f142fc7e1d35f443be076367739faf11cc2cc Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Wed, 7 Oct 2020 21:36:44 -0400 Subject: rpc: change no wallet loaded message to be clearer Changes the no wallet is loaded rpc error message to be clearer that no wallet is loaded and how the user can load or create a wallet. Also changes the error code from METHOD_NOT_FOUND to RPC_WALLET_NOT_FOUND as that makes more sense. --- test/functional/wallet_multiwallet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/functional/wallet_multiwallet.py') diff --git a/test/functional/wallet_multiwallet.py b/test/functional/wallet_multiwallet.py index 155a3be7e2..a0787dd289 100755 --- a/test/functional/wallet_multiwallet.py +++ b/test/functional/wallet_multiwallet.py @@ -204,7 +204,7 @@ class MultiWalletTest(BitcoinTestFramework): self.restart_node(0, ['-nowallet']) assert_equal(node.listwallets(), []) - assert_raises_rpc_error(-32601, "Method not found", node.getwalletinfo) + assert_raises_rpc_error(-18, "No wallet is loaded. Load a wallet using loadwallet or create a new one with createwallet. (Note: A default wallet is no longer automatically created)", node.getwalletinfo) self.log.info("Load first wallet") loadwallet_name = node.loadwallet(wallet_names[0]) @@ -316,7 +316,7 @@ class MultiWalletTest(BitcoinTestFramework): for wallet_name in self.nodes[0].listwallets(): self.nodes[0].unloadwallet(wallet_name) assert_equal(self.nodes[0].listwallets(), []) - assert_raises_rpc_error(-32601, "Method not found (wallet method is disabled because no wallet is loaded)", self.nodes[0].getwalletinfo) + assert_raises_rpc_error(-18, "No wallet is loaded. Load a wallet using loadwallet or create a new one with createwallet. (Note: A default wallet is no longer automatically created)", self.nodes[0].getwalletinfo) # Successfully load a previously unloaded wallet self.nodes[0].loadwallet('w1') -- cgit v1.2.3