Skip to content
Browse files

Remove span read that failed to pass some basic tests

  • Loading branch information...
miltonf committed Mar 17, 2019
1 parent 5aa3b50 commit ce2ae8f537e538c66d612f79dcaec2a5386c40a3
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/cryptonote_protocol/cryptonote_protocol_handler.inl
@@ -1009,13 +1009,15 @@ skip:
if (blocks.empty())
MERROR("Next span has no blocks");
m_block_queue.remove_spans(span_connection_id, start_height);

block new_block;
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);
bool parent_known = m_core.have_block(new_block.prev_id);
@@ -1032,6 +1034,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_last_response_height = 0;
goto skip;

0 comments on commit ce2ae8f

Please sign in to comment.
You can’t perform that action at this time.