Skip to content
Permalink
Browse files

Daemon: Guard against reporting "synchronized" too early

The added condition "hshd.current_height >= target" guards against
reporting "synchronized" too early in the special situation that the
very first peer sending us data is synced to a lower height than
ourselves.
  • Loading branch information
rbrunner7 committed Jan 5, 2020
1 parent b4e1dc8 commit 664720747f7a25c13f5c5daad7583771ea9a9056
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/cryptonote_protocol/cryptonote_protocol_handler.inl
@@ -346,7 +346,7 @@ namespace cryptonote
if(m_core.have_block(hshd.top_id))
{
context.m_state = cryptonote_connection_context::state_normal;
if(is_inital && target == m_core.get_current_blockchain_height())
if(is_inital && hshd.current_height >= target && target == m_core.get_current_blockchain_height())
on_connection_synchronized();
return true;
}

0 comments on commit 6647207

Please sign in to comment.
You can’t perform that action at this time.