mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 20:42:59 +01:00
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.
This commit is contained in:
parent
2ae705d841
commit
7da3b0adb8
@ -46,7 +46,6 @@ enum RPCErrorCode
|
|||||||
|
|
||||||
//! General application defined errors
|
//! General application defined errors
|
||||||
RPC_MISC_ERROR = -1, //!< std::exception thrown in command handling
|
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_TYPE_ERROR = -3, //!< Unexpected type was passed as parameter
|
||||||
RPC_INVALID_ADDRESS_OR_KEY = -5, //!< Invalid address or key
|
RPC_INVALID_ADDRESS_OR_KEY = -5, //!< Invalid address or key
|
||||||
RPC_OUT_OF_MEMORY = -7, //!< Ran out of memory during operation
|
RPC_OUT_OF_MEMORY = -7, //!< Ran out of memory during operation
|
||||||
@ -88,6 +87,9 @@ enum RPCErrorCode
|
|||||||
|
|
||||||
//! Backwards compatible aliases
|
//! Backwards compatible aliases
|
||||||
RPC_WALLET_INVALID_ACCOUNT_NAME = RPC_WALLET_INVALID_LABEL_NAME,
|
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);
|
UniValue JSONRPCRequestObj(const std::string& strMethod, const UniValue& params, const UniValue& id);
|
||||||
|
Loading…
Reference in New Issue
Block a user