From 5c84e0c4bd34cfe523dd7903866fb5b1a29434a1 Mon Sep 17 00:00:00 2001 From: who-biz <37732338+who-biz@users.noreply.github.com> Date: Wed, 19 Jun 2019 13:39:26 -0400 Subject: [PATCH] Remove zeromq macro/remnants --- src/rpc/daemon_handler.cpp | 2 +- src/rpc/daemon_handler.h | 1 - src/rpc/daemon_messages.h | 1 - src/rpc/daemon_rpc_version.h | 44 ------------------------------------ src/rpc/message.cpp | 2 -- 5 files changed, 1 insertion(+), 49 deletions(-) delete mode 100644 src/rpc/daemon_rpc_version.h diff --git a/src/rpc/daemon_handler.cpp b/src/rpc/daemon_handler.cpp index b8310ac9..ce4ba353 100644 --- a/src/rpc/daemon_handler.cpp +++ b/src/rpc/daemon_handler.cpp @@ -768,7 +768,7 @@ namespace rpc void DaemonHandler::handle(const GetRPCVersion::Request& req, GetRPCVersion::Response& res) { - res.version = DAEMON_RPC_VERSION_ZMQ; + res.version = CORE_RPC_VERSION; res.status = Message::STATUS_OK; } diff --git a/src/rpc/daemon_handler.h b/src/rpc/daemon_handler.h index 4c9e4c11..36db2f94 100644 --- a/src/rpc/daemon_handler.h +++ b/src/rpc/daemon_handler.h @@ -29,7 +29,6 @@ #pragma once #include "daemon_messages.h" -#include "daemon_rpc_version.h" #include "rpc_handler.h" #include "cryptonote_core/cryptonote_core.h" #include "cryptonote_protocol/cryptonote_protocol_handler.h" diff --git a/src/rpc/daemon_messages.h b/src/rpc/daemon_messages.h index 1495c845..6a9eabcb 100644 --- a/src/rpc/daemon_messages.h +++ b/src/rpc/daemon_messages.h @@ -31,7 +31,6 @@ #include "message.h" #include "cryptonote_protocol/cryptonote_protocol_defs.h" #include "rpc/message_data_structs.h" -#include "rpc/daemon_rpc_version.h" #include "cryptonote_basic/cryptonote_basic.h" #define BEGIN_RPC_MESSAGE_CLASS(classname) \ diff --git a/src/rpc/daemon_rpc_version.h b/src/rpc/daemon_rpc_version.h deleted file mode 100644 index e20af5b2..00000000 --- a/src/rpc/daemon_rpc_version.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2016-2018, The Monero Project -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other -// materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its contributors may be -// used to endorse or promote products derived from this software without specific -// prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL -// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF -// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#pragma once - -namespace cryptonote -{ - -namespace rpc -{ - -static const uint32_t DAEMON_RPC_VERSION_ZMQ_MINOR = 0; -static const uint32_t DAEMON_RPC_VERSION_ZMQ_MAJOR = 1; - -static const uint32_t DAEMON_RPC_VERSION_ZMQ = DAEMON_RPC_VERSION_ZMQ_MINOR + (DAEMON_RPC_VERSION_ZMQ_MAJOR << 16); - -} // namespace rpc - -} // namespace cryptonote diff --git a/src/rpc/message.cpp b/src/rpc/message.cpp index 0ebe34ef..bf0a55c2 100644 --- a/src/rpc/message.cpp +++ b/src/rpc/message.cpp @@ -27,7 +27,6 @@ // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "message.h" -#include "daemon_rpc_version.h" #include "serialization/json_object.h" #include "rapidjson/writer.h" @@ -62,7 +61,6 @@ rapidjson::Value Message::toJson(rapidjson::Document& doc) const val.AddMember("status", rapidjson::StringRef(status.c_str()), al); val.AddMember("error_details", rapidjson::StringRef(error_details.c_str()), al); - INSERT_INTO_JSON_OBJECT(val, doc, rpc_version, DAEMON_RPC_VERSION_ZMQ); return val; }