aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_protocol/cryptonote_protocol_handler.inl
diff options
context:
space:
mode:
authorrbrunner7 <rbrunner@dreamshare.ch>2020-01-05 16:38:39 +0100
committerrbrunner7 <rbrunner@dreamshare.ch>2020-01-10 15:49:49 +0100
commit664720747f7a25c13f5c5daad7583771ea9a9056 (patch)
treead119acdb6356512471c83dd3ae95c7baefeee3a /src/cryptonote_protocol/cryptonote_protocol_handler.inl
parentMerge pull request #6057 (diff)
downloadmonero-664720747f7a25c13f5c5daad7583771ea9a9056.tar.xz
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.
Diffstat (limited to '')
-rw-r--r--src/cryptonote_protocol/cryptonote_protocol_handler.inl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
index e20934a25..80e28e9c6 100644
--- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl
+++ b/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;
}