From 556746c194076b727c7d707221feb25e5dfca73f Mon Sep 17 00:00:00 2001 From: sowle Date: Thu, 17 Jul 2025 19:05:35 +0300 Subject: [PATCH] currency_protocol: there's no hop in this place anymore --- src/currency_core/currency_core.cpp | 3 +-- src/currency_protocol/currency_protocol_defs.h | 2 -- src/currency_protocol/currency_protocol_handler.inl | 4 +--- src/version.h.in | 2 +- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/currency_core/currency_core.cpp b/src/currency_core/currency_core.cpp index e6e04cc4..7fe8746c 100644 --- a/src/currency_core/currency_core.cpp +++ b/src/currency_core/currency_core.cpp @@ -464,8 +464,7 @@ namespace currency { time_pack_txs_ms = epee::misc_utils::get_tick_count(); currency_connection_context exclude_context = boost::value_initialized(); - NOTIFY_NEW_BLOCK::request arg = AUTO_VAL_INIT(arg); - arg.hop = 0; + NOTIFY_NEW_BLOCK::request arg{}; arg.current_blockchain_height = m_blockchain_storage.get_current_blockchain_size(); std::list missed_txs; std::list txs; diff --git a/src/currency_protocol/currency_protocol_defs.h b/src/currency_protocol/currency_protocol_defs.h index 190b2082..d8dca973 100644 --- a/src/currency_protocol/currency_protocol_defs.h +++ b/src/currency_protocol/currency_protocol_defs.h @@ -58,12 +58,10 @@ namespace currency { block_complete_entry b; uint64_t current_blockchain_height; - uint32_t hop; BEGIN_KV_SERIALIZE_MAP() KV_SERIALIZE(b) KV_SERIALIZE(current_blockchain_height) - KV_SERIALIZE(hop) END_KV_SERIALIZE_MAP() }; }; diff --git a/src/currency_protocol/currency_protocol_handler.inl b/src/currency_protocol/currency_protocol_handler.inl index 3d5710b6..9de4ddf8 100644 --- a/src/currency_protocol/currency_protocol_handler.inl +++ b/src/currency_protocol/currency_protocol_handler.inl @@ -290,7 +290,7 @@ namespace currency } crypto::hash block_id = get_block_hash(b); - LOG_PRINT_GREEN("[HANDLE]NOTIFY_NEW_BLOCK " << block_id << " HEIGHT " << get_block_height(b) << " (hop " << arg.hop << ")", LOG_LEVEL_2); + LOG_PRINT_GREEN("[HANDLE]NOTIFY_NEW_BLOCK " << block_id << " HEIGHT " << get_block_height(b), LOG_LEVEL_2); CRITICAL_REGION_BEGIN(m_blocks_id_que_lock); auto it = m_blocks_id_que.find(block_id); @@ -329,7 +329,6 @@ namespace currency if (m_core.pre_validate_block(b, bvc, block_id) && bvc.m_added_to_main_chain) { //not alternative block, relay it - ++arg.hop; relay_block(arg, context); prevalidate_relayed = true; } @@ -377,7 +376,6 @@ namespace currency if (true/*!prevalidate_relayed*/) { // pre-validation failed prevoiusly, but complete check was success, not an alternative block - ++arg.hop; //TODO: Add here announce protocol usage relay_block(arg, context); } diff --git a/src/version.h.in b/src/version.h.in index a13f4fbb..eeb0eaa0 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -8,6 +8,6 @@ #define PROJECT_REVISION "7" #define PROJECT_VERSION PROJECT_MAJOR_VERSION "." PROJECT_MINOR_VERSION "." PROJECT_REVISION -#define PROJECT_VERSION_BUILD_NO 417 +#define PROJECT_VERSION_BUILD_NO 418 #define PROJECT_VERSION_BUILD_NO_STR STRINGIFY_EXPAND(PROJECT_VERSION_BUILD_NO) #define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO_STR "[" BUILD_COMMIT_ID "]"