diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-08-12 10:59:54 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-08-12 20:36:31 +0100 |
commit | 2ec15a693165db96dd7e75ee060ea4622a47ab7a (patch) | |
tree | 653a9b70c681221108414a0a9243eab8b19f204f /src/cryptonote_protocol/cryptonote_protocol_handler.inl | |
parent | protocol: fix reorgs while syncing (diff) | |
download | monero-2ec15a693165db96dd7e75ee060ea4622a47ab7a.tar.xz |
daemon: print peers' top height in sync_info
Diffstat (limited to '')
-rw-r--r-- | src/cryptonote_protocol/cryptonote_protocol_handler.inl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl index f9fe6fe70..b5a307208 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl @@ -239,6 +239,8 @@ namespace cryptonote cnx.connection_id = cntxt.m_connection_id; + cnx.height = cntxt.m_remote_blockchain_height; + connections.push_back(cnx); return true; @@ -264,6 +266,8 @@ namespace cryptonote return false; } + context.m_remote_blockchain_height = hshd.current_height; + uint64_t target = m_core.get_target_blockchain_height(); if (target == 0) target = m_core.get_current_blockchain_height(); @@ -293,7 +297,6 @@ namespace cryptonote } LOG_PRINT_L1("Remote blockchain height: " << hshd.current_height << ", id: " << hshd.top_id); context.m_state = cryptonote_connection_context::state_synchronizing; - context.m_remote_blockchain_height = hshd.current_height; //let the socket to send response to handshake, but request callback, to let send request data after response LOG_PRINT_CCONTEXT_L2("requesting callback"); ++context.m_callback_request_count; |