Skip to content

Commit

Permalink
fix comment and use define for BLOCK_MAJOR_VERSION_4 instead of integer
Browse files Browse the repository at this point in the history
  • Loading branch information
iedemam committed May 4, 2018
1 parent 84a941c commit f7bfdc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cryptonote_protocol/cryptonote_protocol_handler.inl
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ namespace cryptonote
if(context.m_state == cryptonote_connection_context::state_synchronizing)
return true;

// from v6, if the peer advertises a top block version, reject if it's not what it should be (will only work if no voting)
// from v4, if the peer advertises a top block version, reject if it's not what it should be (will only work if no voting)
const uint8_t version = m_core.get_ideal_hard_fork_version(hshd.current_height - 1);
if (version >= 4 && version != hshd.top_version)
if (version >= BLOCK_MAJOR_VERSION_4 && version != hshd.top_version)
{
if (version < hshd.top_version)
MCLOG_RED(el::Level::Warning, "global", context << " peer claims higher version that we think - we may be forked from the network and a software upgrade may be needed");
Expand Down

1 comment on commit f7bfdc2

@valiant1x
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 good catch, thank you

Please sign in to comment.