aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-07-27 17:51:14 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2017-07-27 18:58:24 +0200
commit0b11a07848754347add990a2b2cff4828ffa2be0 (patch)
tree4ae97378b6c0c3e3e8ac3b4b4a8833de070ae2e8 /test
parentba1bbb049b8f3ad295f36b060f775591b1fed8c1 (diff)
parentdf389bca2048f5814387987463fe3298766bc6b6 (diff)
downloadbitcoin-0b11a07848754347add990a2b2cff4828ffa2be0.tar.xz
Merge #10931: Fix misleading "Method not found" multiwallet errors
df389bc Change wallet method disabled error text (Russell Yanofsky) e526b3d Fix misleading "Method not found" multiwallet errors (Russell Yanofsky) Pull request description: Raise RPC_WALLET_NOT_SPECIFIED instead of RPC_METHOD_NOT_FOUND when a required wallet filename was not specified in an RPC call. Also raise more specific RPC_WALLET_NOT_FOUND error instead of RPC_INVALID_PARAMETER in case an invalid wallet was specified, for consistency. Tree-SHA512: 6a8d885283f69bcfc28f2e08ac03eff02f9f8160a312ce2a90d868aa52533434fc0b4c4ab86547c2f09392338956df915637eaf7136a4fc105e6c8179f2d0ac8
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/multiwallet.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/functional/multiwallet.py b/test/functional/multiwallet.py
index f0929a8e28..173f06cf5d 100755
--- a/test/functional/multiwallet.py
+++ b/test/functional/multiwallet.py
@@ -21,8 +21,11 @@ class MultiWalletTest(BitcoinTestFramework):
w1 = self.nodes[0] / "wallet/w1"
w1.generate(1)
+ # accessing invalid wallet fails
+ assert_raises_jsonrpc(-18, "Requested wallet does not exist or is not loaded", (self.nodes[0] / "wallet/bad").getwalletinfo)
+
# accessing wallet RPC without using wallet endpoint fails
- assert_raises_jsonrpc(-32601, "Method not found", self.nodes[0].getwalletinfo)
+ assert_raises_jsonrpc(-19, "Wallet file not specified", self.nodes[0].getwalletinfo)
# check w1 wallet balance
w1_info = w1.getwalletinfo()