mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #7267
c2295f5
protocol: handle receiving a block hash we've not added yet (moneromooo-monero)
This commit is contained in:
commit
83fa752a84
1 changed files with 9 additions and 4 deletions
|
@ -2593,11 +2593,16 @@ 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)
|
||||||
{
|
{
|
||||||
LOG_ERROR_CCONTEXT("First block hash is unknown, dropping connection");
|
if (!have_block && !m_block_queue.requested(arg.m_block_ids[i]) && !m_block_queue.have(arg.m_block_ids[i]))
|
||||||
drop_connection_with_score(context, 5, false);
|
{
|
||||||
return 1;
|
LOG_ERROR_CCONTEXT("First block hash is unknown, dropping connection");
|
||||||
|
drop_connection_with_score(context, 5, false);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
if (!have_block)
|
||||||
|
expect_unknown = true;
|
||||||
}
|
}
|
||||||
if (!first)
|
if (!first)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue