aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_protocol
diff options
context:
space:
mode:
authorfluffypony <ric@spagni.net>2014-06-06 00:23:56 +0200
committerfluffypony <ric@spagni.net>2014-06-06 00:23:56 +0200
commit92ac24dc43c2afd2e5996a7c0fa82823e2f6199c (patch)
treeaea570eb3b393cfac94f7145804962f42ce2fc4b /src/cryptonote_protocol
parente0685d412a931520766ce4e1678760c1fb06a1e2 (diff)
parent3162fcb70fa609eebfcb1cac004041fbca37a7cc (diff)
downloadmonzero-core-92ac24dc43c2afd2e5996a7c0fa82823e2f6199c.tar.gz
monzero-core-92ac24dc43c2afd2e5996a7c0fa82823e2f6199c.tar.xz
monzero-core-92ac24dc43c2afd2e5996a7c0fa82823e2f6199c.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/cryptonote_protocol')
-rw-r--r--src/cryptonote_protocol/cryptonote_protocol_handler.inl5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
index 2584f1097..a2f0bb3ad 100644
--- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl
+++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
@@ -108,6 +108,11 @@ namespace cryptonote
return true;
}
+ /* As I don't know if accessing hshd from core could be a good practice,
+ 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());
LOG_PRINT_CCONTEXT_YELLOW("Sync data returned unknown top block: " << m_core.get_current_blockchain_height() << " -> " << hshd.current_height
<< " [" << std::abs(diff) << " blocks (" << diff / (24 * 60 * 60 / DIFFICULTY_TARGET) << " days) "