aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-27 13:54:19 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-27 13:54:19 +0000
commitf06603a439ab830df16c92b29fd31725ab150739 (patch)
tree50234b4d8bc5e6a7bbdaf70eacbbba4694d28d10
parentMerge pull request #2611 (diff)
downloadmonero-f06603a439ab830df16c92b29fd31725ab150739.tar.xz
cryptonote_protocol: update target height when receiving blocks
-rw-r--r--src/cryptonote_protocol/cryptonote_protocol_handler.inl2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
index 8aef31a5a..5ce3a0c77 100644
--- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl
+++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
@@ -876,6 +876,8 @@ namespace cryptonote
}
context.m_remote_blockchain_height = arg.current_blockchain_height;
+ if (context.m_remote_blockchain_height > m_core.get_target_blockchain_height())
+ m_core.set_target_blockchain_height(context.m_remote_blockchain_height);
std::vector<crypto::hash> block_hashes;
block_hashes.reserve(arg.blocks.size());