Skip to content

Commit

Permalink
Merge pull request #155 from thaerkh/height-warn
Browse files Browse the repository at this point in the history
Account for top height to trigger upgrade considerations
  • Loading branch information
cryptochangements34 authored Jan 11, 2019
2 parents 59c395f + 83821bd commit 7162ad5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cryptonote_protocol/cryptonote_protocol_handler.inl
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 7162ad5

Please sign in to comment.