diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-07-27 17:51:14 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-07-27 18:58:24 +0200 |
commit | 0b11a07848754347add990a2b2cff4828ffa2be0 (patch) | |
tree | 4ae97378b6c0c3e3e8ac3b4b4a8833de070ae2e8 /src/rpc/protocol.h | |
parent | ba1bbb049b8f3ad295f36b060f775591b1fed8c1 (diff) | |
parent | df389bca2048f5814387987463fe3298766bc6b6 (diff) | |
download | bitcoin-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 'src/rpc/protocol.h')
-rw-r--r-- | src/rpc/protocol.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rpc/protocol.h b/src/rpc/protocol.h index 70f7092cfe..4bd4702d62 100644 --- a/src/rpc/protocol.h +++ b/src/rpc/protocol.h @@ -82,6 +82,8 @@ enum RPCErrorCode RPC_WALLET_WRONG_ENC_STATE = -15, //!< Command given in wrong wallet encryption state (encrypting an encrypted wallet etc.) RPC_WALLET_ENCRYPTION_FAILED = -16, //!< Failed to encrypt the wallet RPC_WALLET_ALREADY_UNLOCKED = -17, //!< Wallet is already unlocked + RPC_WALLET_NOT_FOUND = -18, //!< Invalid wallet specified + RPC_WALLET_NOT_SPECIFIED = -19, //!< No wallet specified (error when there are multiple wallets loaded) }; UniValue JSONRPCRequestObj(const std::string& strMethod, const UniValue& params, const UniValue& id); |