mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
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.
This commit is contained in:
parent
b4e1dc83d2
commit
664720747f
1 changed files with 1 additions and 1 deletions
|
@ -346,7 +346,7 @@ namespace cryptonote
|
||||||
if(m_core.have_block(hshd.top_id))
|
if(m_core.have_block(hshd.top_id))
|
||||||
{
|
{
|
||||||
context.m_state = cryptonote_connection_context::state_normal;
|
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();
|
on_connection_synchronized();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue