aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-08-15 17:49:06 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-08-15 17:49:06 +0100
commit35e01a6e505fc614484f6d880bcc7b83f35e6486 (patch)
tree81a9a20f8db3e50aeed78a9c9ee101cea9d91854 /src
parentcryptonote_protocol: fix out of order addition (diff)
downloadmonero-35e01a6e505fc614484f6d880bcc7b83f35e6486.tar.xz
cryptonote_protocol: fix "holes" in block download schedule
Diffstat (limited to 'src')
-rw-r--r--src/cryptonote_protocol/cryptonote_protocol_handler.inl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
index e9dcd135f..0e79c0e48 100644
--- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl
+++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
@@ -959,6 +959,8 @@ namespace cryptonote
MDEBUG(context << " adding span: " << arg.blocks.size() << " at height " << start_height << ", " << dt.total_microseconds()/1e6 << " seconds, " << (rate/1e3) << " kB/s, size now " << (m_block_queue.get_data_size() + blocks_size) / 1048576.f << " MB");
m_block_queue.add_blocks(start_height, arg.blocks, context.m_connection_id, rate, blocks_size);
+ context.m_last_known_hash = cryptonote::get_blob_hash(arg.blocks.back().block);
+
if (m_core.get_test_drop_download() && m_core.get_test_drop_download_height()) { // DISCARD BLOCKS for testing
// We try to lock the sync lock. If we can, it means no other thread is
@@ -1521,7 +1523,6 @@ skip:
{
context.m_needed_objects.push_back(bl_id);
}
- context.m_last_known_hash = context.m_needed_objects.back();
if (!request_missing_objects(context, false))
{