cryptonote_protocol_handler.inl: remove span read just now that failed to pass some basic tests

pull/88/head
stoffu 6 years ago
parent 409bf2d642
commit 16b2022991
No known key found for this signature in database
GPG Key ID: 41DAB8343A9EC012

@ -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;

Loading…
Cancel
Save