aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_protocol/cryptonote_protocol_handler.inl
diff options
context:
space:
mode:
authorstoffu <stoffu@protonmail.ch>2018-04-28 11:10:59 +0900
committerstoffu <stoffu@protonmail.ch>2018-04-29 08:00:41 +0900
commit16b20229919eb1839e7b0e2b752ba0f879f23b5f (patch)
tree96f9baa0f72c7dc2e422117b5fe5ab3859adca43 /src/cryptonote_protocol/cryptonote_protocol_handler.inl
parentcryptonote_protocol_handler.inl: fix return type mismatches (int vs bool) (diff)
downloadmonero-16b20229919eb1839e7b0e2b752ba0f879f23b5f.tar.xz
cryptonote_protocol_handler.inl: remove span read just now that failed to pass some basic tests
Diffstat (limited to '')
-rw-r--r--src/cryptonote_protocol/cryptonote_protocol_handler.inl3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
index 31d57cdff..ca3d35f16 100644
--- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl
+++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
@@ -1008,6 +1008,7 @@ skip:
if (blocks.empty())
{
MERROR("Next span has no blocks");
+ m_block_queue.remove_spans(span_connection_id, start_height);
break;
}
@@ -1015,6 +1016,7 @@ skip:
if (!parse_and_validate_block_from_blob(blocks.front().block, new_block))
{
MERROR("Failed to parse block, but it should already have been parsed");
+ m_block_queue.remove_spans(span_connection_id, start_height);
break;
}
bool parent_known = m_core.have_block(new_block.prev_id);
@@ -1031,6 +1033,7 @@ skip:
// this can happen if a connection was sicced onto a late span, if it did not have those blocks,
// since we don't know that at the sic time
LOG_ERROR_CCONTEXT("Got block with unknown parent which was not requested - querying block hashes");
+ m_block_queue.remove_spans(span_connection_id, start_height);
context.m_needed_objects.clear();
context.m_last_response_height = 0;
goto skip;