aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/protocol.h
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-07-17 05:42:30 -0400
committerRussell Yanofsky <russ@yanofsky.org>2017-07-26 02:48:15 -0400
commite526b3d34c20cd723b08252638d10a7584b697cb (patch)
tree21f1193f8cc46dd043cf4acfac0797feac5de192 /src/rpc/protocol.h
parent04d395e8327d512ae31d8e024d95e2d1e1729954 (diff)
Fix misleading "Method not found" multiwallet errors
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.
Diffstat (limited to 'src/rpc/protocol.h')
-rw-r--r--src/rpc/protocol.h2
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);