Merge pull request #7122

3a3370096 protocol: one more sanity check on usable data from a peer (moneromooo-monero)
remotes/1691602464505633909/tmp_refs/heads/wonerujo-v0.10.1
Alexander Blair 3 years ago
commit 7a9ba3f154
No known key found for this signature in database
GPG Key ID: C64552D877C32479

@ -2528,7 +2528,7 @@ skip:
}
uint64_t n_use_blocks = m_core.prevalidate_block_hashes(arg.start_height, arg.m_block_ids, arg.m_block_weights);
if (n_use_blocks + HASH_OF_HASHES_STEP <= arg.m_block_ids.size())
if (n_use_blocks == 0 || n_use_blocks + HASH_OF_HASHES_STEP <= arg.m_block_ids.size())
{
LOG_ERROR_CCONTEXT("Most blocks are invalid, dropping connection");
drop_connection(context, true, false);

Loading…
Cancel
Save