diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-11-26 12:53:33 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-11-26 12:56:44 +0000 |
commit | d6086f5b4ee7b35c006c46d8d69c4fcacabf37e7 (patch) | |
tree | 34a0766edc040231ea6ac90fadab8f937e63cd72 /src/rpc | |
parent | Merge pull request #1372 (diff) | |
download | monero-d6086f5b4ee7b35c006c46d8d69c4fcacabf37e7.tar.xz |
Improve daemon RPC version handling
Daemon RPC version is now composed of a major and minor number,
so that incompatible changes bump the major version, while
compatible changes can still bump the minor version without
causing clients to unnecessarily complain.
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/core_rpc_server_commands_defs.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h index e19238c44..23fcb0a92 100644 --- a/src/rpc/core_rpc_server_commands_defs.h +++ b/src/rpc/core_rpc_server_commands_defs.h @@ -41,7 +41,16 @@ namespace cryptonote #define CORE_RPC_STATUS_BUSY "BUSY" #define CORE_RPC_STATUS_NOT_MINING "NOT MINING" -#define CORE_RPC_VERSION 5 +// When making *any* change here, bump minor +// If the change is incompatible, then bump major and set minor to 0 +// This ensures CORE_RPC_VERSION always increases, that every change +// has its own version, and that clients can just test major to see +// whether they can talk to a given daemon without having to know in +// advance which version they will stop working with +// Don't go over 32767 for any of these +#define CORE_RPC_VERSION_MAJOR 1 +#define CORE_RPC_VERSION_MINOR 0 +#define CORE_RPC_VERSION (((CORE_RPC_VERSION_MAJOR)<<16)|(CORE_RPC_VERSION_MINOR)) struct COMMAND_RPC_GET_HEIGHT { |