diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-07-07 20:52:24 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-08-07 09:33:09 +0100 |
commit | 84e23156acdb10d1e0086d5e38454f1c8406a86c (patch) | |
tree | 9f3b0f855a10eaf0fa777a908e608d9976067494 /src | |
parent | cryptonote_protocol_handler: sync speedup (diff) | |
download | monero-84e23156acdb10d1e0086d5e38454f1c8406a86c.tar.xz |
cryptonote_protocol: avoid spurious SYNCHRONIZED OK messages
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptonote_protocol/cryptonote_protocol_handler.inl | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl index e3d88b353..c93a09a85 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl @@ -1402,8 +1402,18 @@ skip: << "\r\non connection [" << epee::net_utils::print_connection_context_short(context)<< "]"); context.m_state = cryptonote_connection_context::state_normal; - MGINFO_GREEN("SYNCHRONIZED OK"); - on_connection_synchronized(); + 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 + { + MINFO(context << " we've reached this peer's blockchain height"); + } } return true; } |