diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-04-27 09:19:09 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-04-27 09:19:09 +0200 |
commit | 7da3b0adb836794cb22668b5101a6a4748543ea0 (patch) | |
tree | 7193f0c604d14b1d1fbd1b4b6ba853a7c4f1460b /src/rpc | |
parent | 2ae705d84178fb9faa49f92091206e92379a2c63 (diff) |
rpc: Move RPC_FORBIDDEN_BY_SAFE_MODE code to reserved section
Although this code is no longer ever sent back after removing safe mode,
it would be unwise to remove it from the header.
For one, it would be bad to accidentally re-use the number.
Also some API documentation / bindings are directly generated from the .h
file - this is why the "Aliases for backward compatibility" are there. We don't
want to break code that relies on this error code existing, even if it's never
generated.
So keep it around but move it to a reserved section.
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/protocol.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rpc/protocol.h b/src/rpc/protocol.h index 4a265735d2..6954aed252 100644 --- a/src/rpc/protocol.h +++ b/src/rpc/protocol.h @@ -46,7 +46,6 @@ enum RPCErrorCode //! General application defined errors RPC_MISC_ERROR = -1, //!< std::exception thrown in command handling - RPC_FORBIDDEN_BY_SAFE_MODE = -2, //!< Server is in safe mode, and command is not allowed in safe mode RPC_TYPE_ERROR = -3, //!< Unexpected type was passed as parameter RPC_INVALID_ADDRESS_OR_KEY = -5, //!< Invalid address or key RPC_OUT_OF_MEMORY = -7, //!< Ran out of memory during operation @@ -88,6 +87,9 @@ enum RPCErrorCode //! Backwards compatible aliases RPC_WALLET_INVALID_ACCOUNT_NAME = RPC_WALLET_INVALID_LABEL_NAME, + + //! Unused reserved codes, kept around for backwards compatibility. Do not reuse. + RPC_FORBIDDEN_BY_SAFE_MODE = -2, //!< Server is in safe mode, and command is not allowed in safe mode }; UniValue JSONRPCRequestObj(const std::string& strMethod, const UniValue& params, const UniValue& id); |