From 9dc5cf51c3f9cbf17d7b2077b9a4ea25c011f1d1 Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 19 Aug 2026 15:38:51 +0200 Subject: [PATCH] rpc, common: remove dead code --- src/common/perf_timer.h | 2 -- src/common/rpc_client.h | 27 --------------------------- src/common/util.h | 8 -------- src/rpc/core_rpc_server.h | 1 - 4 files changed, 38 deletions(-) diff --git a/src/common/perf_timer.h b/src/common/perf_timer.h index 8e9e10055..bd1a228d4 100644 --- a/src/common/perf_timer.h +++ b/src/common/perf_timer.h @@ -77,9 +77,7 @@ private: #define PERF_TIMER_NAME(name) pt_##name #define PERF_TIMER_UNIT(name, unit) tools::LoggingPerformanceTimer PERF_TIMER_NAME(name)(#name, "perf." MONERO_DEFAULT_LOG_CATEGORY, unit, tools::performance_timer_log_level) -#define PERF_TIMER_UNIT_L(name, unit, l) tools::LoggingPerformanceTimer PERF_TIMER_NAME(name)t_##name(#name, "perf." MONERO_DEFAULT_LOG_CATEGORY, unit, l) #define PERF_TIMER(name) PERF_TIMER_UNIT(name, 1000000) -#define PERF_TIMER_L(name, l) PERF_TIMER_UNIT_L(name, 1000000, l) #define PERF_TIMER_START_UNIT(name, unit) std::unique_ptr PERF_TIMER_NAME(name)(new tools::LoggingPerformanceTimer(#name, "perf." MONERO_DEFAULT_LOG_CATEGORY, unit, el::Level::Info)) #define PERF_TIMER_START(name) PERF_TIMER_START_UNIT(name, 1000000) #define PERF_TIMER_STOP(name) do { PERF_TIMER_NAME(name).reset(NULL); } while(0) diff --git a/src/common/rpc_client.h b/src/common/rpc_client.h index 4bc75a1be..1c63921c7 100644 --- a/src/common/rpc_client.h +++ b/src/common/rpc_client.h @@ -59,33 +59,6 @@ namespace tools ); } - template - bool basic_json_rpc_request( - T_req & req - , T_res & res - , std::string const & method_name - ) - { - t_http_connection connection(&m_http_client); - - bool ok = connection.is_open(); - if (!ok) - { - fail_msg_writer() << "Couldn't connect to daemon: " << m_http_client.get_host() << ":" << m_http_client.get_port(); - return false; - } - ok = epee::net_utils::invoke_http_json_rpc("/json_rpc", method_name, req, res, m_http_client, t_http_connection::TIMEOUT()); - if (!ok) - { - fail_msg_writer() << "basic_json_rpc_request: Daemon request failed"; - return false; - } - else - { - return true; - } - } - template bool json_rpc_request( T_req & req diff --git a/src/common/util.h b/src/common/util.h index 3b0f1dbd6..1d6fe373f 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -136,14 +136,6 @@ namespace tools std::string get_special_folder_path(int nfolder, bool iscreate); #endif - /*! \brief Returns the OS version string - * - * \details This is a wrapper around the primitives - * get_windows_version_display_string() and - * get_nix_version_display_string() - */ - std::string get_os_version_string(); - /*! \brief creates directories for a path * * wrapper around boost::filesystem::create_directories. diff --git a/src/rpc/core_rpc_server.h b/src/rpc/core_rpc_server.h index 02b1c1552..1e653b53b 100644 --- a/src/rpc/core_rpc_server.h +++ b/src/rpc/core_rpc_server.h @@ -245,7 +245,6 @@ namespace cryptonote //----------------------- private: - bool check_core_busy(); bool check_core_ready(); bool add_host_fail(const connection_context *ctx, unsigned int score = 1);