From 83821bd4dc005260cd52d5fd25f0c399caf8a8f6 Mon Sep 17 00:00:00 2001 From: Thaer Khawaja Date: Fri, 11 Jan 2019 13:24:15 -0800 Subject: [PATCH] Account for top height to trigger upgrade considerations --- 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 20d9a390..6d7a1a52 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl @@ -272,7 +272,7 @@ namespace cryptonote const uint8_t version = m_core.get_ideal_hard_fork_version(hshd.current_height - 1); if (version >= 1 && version != hshd.top_version) { - if (version < hshd.top_version && version == m_core.get_ideal_hard_fork_version()) + if (version < hshd.top_version && version == m_core.get_ideal_hard_fork_version() && m_core.get_target_blockchain_height() < hshd.current_height) MCLOG_RED(el::Level::Warning, "global", context << " peer claims higher version that we think (" << (unsigned)hshd.top_version << " for " << (hshd.current_height - 1) << " instead of " << (unsigned)version << ") - we may be forked from the network and a software upgrade may be needed");