mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-29 18:53:14 +00:00
Merge pull request #7121
cd7e9769d
protocol: one more sanity check on usable data from a peer (moneromooo-monero)
This commit is contained in:
commit
0f67569279
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
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");
|
LOG_ERROR_CCONTEXT("Most blocks are invalid, dropping connection");
|
||||||
drop_connection(context, true, false);
|
drop_connection(context, true, false);
|
||||||
|
|
Loading…
Reference in a new issue