From 71248cfd25d59fde57ef17896f08288b834fa2a0 Mon Sep 17 00:00:00 2001 From: cryptozoidberg Date: Thu, 10 Apr 2025 00:35:59 +0400 Subject: [PATCH] fix with resetting state to blocchain shortener --- src/currency_protocol/currency_protocol_handler.inl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/currency_protocol/currency_protocol_handler.inl b/src/currency_protocol/currency_protocol_handler.inl index 68679c4e..8f5bbae1 100644 --- a/src/currency_protocol/currency_protocol_handler.inl +++ b/src/currency_protocol/currency_protocol_handler.inl @@ -207,6 +207,7 @@ namespace currency context.m_state = currency_connection_context::state_synchronizing; context.m_remote_blockchain_height = hshd.current_height; + context.m_priv.m_last_fetched_block_ids.clear(); //let the socket to send response to handshake, but request callback, to let send request data after response LOG_PRINT_L3("requesting callback"); ++context.m_priv.m_callback_request_count; @@ -368,6 +369,7 @@ namespace currency }else if(bvc.m_marked_as_orphaned) { context.m_state = currency_connection_context::state_synchronizing; + context.m_priv.m_last_fetched_block_ids.clear(); NOTIFY_REQUEST_CHAIN::request r = boost::value_initialized(); m_core.get_short_chain_history(r.block_ids); LOG_PRINT_MAGENTA("State changed to state_synchronizing.", LOG_LEVEL_2);