protocol: fix delayed "you are now synchronized..." message

pull/402/head
moneromooo-monero 3 years ago committed by wowario
parent fb21f2748b
commit dfeafb77b9

@ -2095,6 +2095,8 @@ skip:
}
MDEBUG(context << "Nothing to get from this peer, and it's not ahead of us, all done");
context.m_state = cryptonote_connection_context::state_normal;
if (m_core.get_current_blockchain_height() >= m_core.get_target_blockchain_height())
on_connection_synchronized();
return true;
}
uint64_t next_needed_height = m_block_queue.get_next_needed_height(bc_height);
@ -2242,6 +2244,8 @@ skip:
}
MDEBUG(context << "Nothing to get from this peer, and it's not ahead of us, all done");
context.m_state = cryptonote_connection_context::state_normal;
if (m_core.get_current_blockchain_height() >= m_core.get_target_blockchain_height())
on_connection_synchronized();
return true;
}
@ -2433,10 +2437,7 @@ skip:
if (context.m_remote_blockchain_height >= m_core.get_target_blockchain_height())
{
if (m_core.get_current_blockchain_height() >= m_core.get_target_blockchain_height())
{
MGINFO_GREEN("SYNCHRONIZED OK");
on_connection_synchronized();
}
}
else
{

Loading…
Cancel
Save