mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-23 10:37:37 -07:00
Merge pull request #7266
38a6e6e
protocol: handle receiving a block hash we've not added yet (moneromooo-monero)
This commit is contained in:
commit
69e4a2c62d
@ -2593,12 +2593,17 @@ skip:
|
|||||||
}
|
}
|
||||||
int where;
|
int where;
|
||||||
const bool have_block = m_core.have_block_unlocked(arg.m_block_ids[i], &where);
|
const bool have_block = m_core.have_block_unlocked(arg.m_block_ids[i], &where);
|
||||||
if (first && !have_block)
|
if (first)
|
||||||
|
{
|
||||||
|
if (!have_block && !m_block_queue.requested(arg.m_block_ids[i]) && !m_block_queue.have(arg.m_block_ids[i]))
|
||||||
{
|
{
|
||||||
LOG_ERROR_CCONTEXT("First block hash is unknown, dropping connection");
|
LOG_ERROR_CCONTEXT("First block hash is unknown, dropping connection");
|
||||||
drop_connection_with_score(context, 5, false);
|
drop_connection_with_score(context, 5, false);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
if (!have_block)
|
||||||
|
expect_unknown = true;
|
||||||
|
}
|
||||||
if (!first)
|
if (!first)
|
||||||
{
|
{
|
||||||
// after the first, blocks may be known or unknown, but if they are known,
|
// after the first, blocks may be known or unknown, but if they are known,
|
||||||
|
Loading…
Reference in New Issue
Block a user