From 014f3a0d39e5314c13ae7420283b1ea5eb593517 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sun, 10 Jul 2016 16:49:40 +0100 Subject: Add a daemon RPC version, and make simplewallet check it If the version is different, simplewallet will refuse to use that daemon, unless --allow-mismatched-daemon-version is used. --- src/rpc/core_rpc_server.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/rpc/core_rpc_server.h') diff --git a/src/rpc/core_rpc_server.h b/src/rpc/core_rpc_server.h index a7a54b59f..54723c7ef 100644 --- a/src/rpc/core_rpc_server.h +++ b/src/rpc/core_rpc_server.h @@ -111,6 +111,7 @@ namespace cryptonote MAP_JON_RPC_WE_IF("getbans", on_get_bans, COMMAND_RPC_GETBANS, !m_restricted) MAP_JON_RPC_WE_IF("flush_txpool", on_flush_txpool, COMMAND_RPC_FLUSH_TRANSACTION_POOL, !m_restricted) MAP_JON_RPC_WE("get_output_histogram", on_get_output_histogram, COMMAND_RPC_GET_OUTPUT_HISTOGRAM) + MAP_JON_RPC_WE("get_version", on_get_version, COMMAND_RPC_GET_VERSION) END_JSON_RPC_MAP() END_URI_MAP2() @@ -153,6 +154,7 @@ namespace cryptonote bool on_get_bans(const COMMAND_RPC_GETBANS::request& req, COMMAND_RPC_GETBANS::response& res, epee::json_rpc::error& error_resp); bool on_flush_txpool(const COMMAND_RPC_FLUSH_TRANSACTION_POOL::request& req, COMMAND_RPC_FLUSH_TRANSACTION_POOL::response& res, epee::json_rpc::error& error_resp); bool on_get_output_histogram(const COMMAND_RPC_GET_OUTPUT_HISTOGRAM::request& req, COMMAND_RPC_GET_OUTPUT_HISTOGRAM::response& res, epee::json_rpc::error& error_resp); + bool on_get_version(const COMMAND_RPC_GET_VERSION::request& req, COMMAND_RPC_GET_VERSION::response& res, epee::json_rpc::error& error_resp); //----------------------- private: -- cgit v1.2.3