mirror of
https://github.com/monero-project/monero.git
synced 2024-12-23 03:59:33 +00:00
Fix check for disconnecting peers when syncing
The check added here (in #5732/#5733) is supposed to disconnect behind peers when the current node is syncing, but actually disconnects behind peers always. We are syncing when `target > our_height`, but the check here triggers when `target > remote_height`, which is basically always true when the preceding `m_core.have_block(hshd.top_id)` check is true.
This commit is contained in:
parent
8f0aedfa1a
commit
ca8d4a38c9
1 changed files with 1 additions and 1 deletions
|
@ -341,7 +341,7 @@ namespace cryptonote
|
||||||
|
|
||||||
if(m_core.have_block(hshd.top_id))
|
if(m_core.have_block(hshd.top_id))
|
||||||
{
|
{
|
||||||
if (target > hshd.current_height)
|
if (target > m_core.get_current_blockchain_height())
|
||||||
{
|
{
|
||||||
MINFO(context << "peer is not ahead of us and we're syncing, disconnecting");
|
MINFO(context << "peer is not ahead of us and we're syncing, disconnecting");
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue