From fae7c0429f96e08bcac944f6fa30264636dfda8c Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Fri, 19 Feb 2021 10:33:49 +0100 Subject: [PATCH] log: Clarify that block request below NODE_NETWORK_LIMITED_MIN_BLOCKS disconnects --- src/net_processing.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 6454f58675..53034805e5 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -1580,8 +1580,6 @@ void PeerManagerImpl::ProcessGetBlockData(CNode& pfrom, Peer& peer, const CInv& !pfrom.HasPermission(PF_DOWNLOAD) // nodes with the download permission may exceed target ) { LogPrint(BCLog::NET, "historical block serving limit reached, disconnect peer=%d\n", pfrom.GetId()); - - //disconnect node pfrom.fDisconnect = true; send = false; } @@ -1589,8 +1587,7 @@ void PeerManagerImpl::ProcessGetBlockData(CNode& pfrom, Peer& peer, const CInv& if (send && !pfrom.HasPermission(PF_NOBAN) && ( (((pfrom.GetLocalServices() & NODE_NETWORK_LIMITED) == NODE_NETWORK_LIMITED) && ((pfrom.GetLocalServices() & NODE_NETWORK) != NODE_NETWORK) && (m_chainman.ActiveChain().Tip()->nHeight - pindex->nHeight > (int)NODE_NETWORK_LIMITED_MIN_BLOCKS + 2 /* add two blocks buffer extension for possible races */) ) )) { - LogPrint(BCLog::NET, "Ignore block request below NODE_NETWORK_LIMITED threshold from peer=%d\n", pfrom.GetId()); - + LogPrint(BCLog::NET, "Ignore block request below NODE_NETWORK_LIMITED threshold, disconnect peer=%d\n", pfrom.GetId()); //disconnect node and prevent it from stalling (would otherwise wait for the missing block) pfrom.fDisconnect = true; send = false;