diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-02-24 00:29:47 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-02-24 01:28:56 +0000 |
commit | 4d05955d53dcecd719988f9bf50878b572bce48e (patch) | |
tree | fd90b5478960d885d43871b6afc14a9649239cf5 | |
parent | Merge pull request #1775 (diff) | |
download | monero-4d05955d53dcecd719988f9bf50878b572bce48e.tar.xz |
protocol: fix "sync done" message not appearing
-rw-r--r-- | src/cryptonote_protocol/cryptonote_protocol_handler.inl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl index 0ce52a3f0..f007a83a8 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl @@ -266,6 +266,9 @@ namespace cryptonote return true; uint64_t target = m_core.get_target_blockchain_height(); + if (target == 0) + target = m_core.get_current_blockchain_height(); + if(m_core.have_block(hshd.top_id)) { context.m_state = cryptonote_connection_context::state_normal; @@ -280,7 +283,6 @@ namespace cryptonote I prefer pushing target height to the core at the same time it is pushed to the user. Nz. */ m_core.set_target_blockchain_height(static_cast<int64_t>(hshd.current_height)); - int64_t diff = static_cast<int64_t>(hshd.current_height) - static_cast<int64_t>(m_core.get_current_blockchain_height()); int64_t max_block_height = max(static_cast<int64_t>(hshd.current_height),static_cast<int64_t>(m_core.get_current_blockchain_height())); int64_t last_block_v1 = 1009826; |