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.
This commit is contained in:
moneromooo-monero
2016-07-10 16:49:40 +01:00
parent 18dd507024
commit 014f3a0d39
7 changed files with 86 additions and 20 deletions

View File

@@ -1146,6 +1146,13 @@ namespace cryptonote
return true;
}
//------------------------------------------------------------------------------------------------------------------------------
bool core_rpc_server::on_get_version(const COMMAND_RPC_GET_VERSION::request& req, COMMAND_RPC_GET_VERSION::response& res, epee::json_rpc::error& error_resp)
{
res.version = CORE_RPC_VERSION;
res.status = CORE_RPC_STATUS_OK;
return true;
}
//------------------------------------------------------------------------------------------------------------------------------
bool core_rpc_server::on_fast_exit(const COMMAND_RPC_FAST_EXIT::request& req, COMMAND_RPC_FAST_EXIT::response& res)
{
cryptonote::core::set_fast_exit();