From 317ab21a0317fdf38424d7d342e8bacc382c9a0a Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Wed, 23 Aug 2017 01:22:12 +0100 Subject: [PATCH] cryptonote_protocol: less strict check on top version on connect This allows peers who synced past a fork on the wrong height to reorg to the right chain after they updated their software to include the new version. --- src/cryptonote_protocol/cryptonote_protocol_handler.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl index 2cc1b0dd1..d4736fade 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl @@ -315,7 +315,7 @@ namespace cryptonote bool t_cryptonote_protocol_handler::get_payload_sync_data(CORE_SYNC_DATA& hshd) { m_core.get_blockchain_top(hshd.current_height, hshd.top_id); - hshd.top_version = m_core.get_hard_fork_version(hshd.current_height); + hshd.top_version = m_core.get_ideal_hard_fork_version(hshd.current_height); hshd.cumulative_difficulty = m_core.get_block_cumulative_difficulty(hshd.current_height); hshd.current_height +=1; return true;