mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-12-22 18:08:52 +00:00
protocol: one more sanity check on usable data from a peer
This commit is contained in:
parent
316dcaa399
commit
cd7e9769d8
@ -2522,7 +2522,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…
Reference in New Issue
Block a user