diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-02-19 10:33:49 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-03-18 09:12:37 +0100 |
commit | fae7c0429f96e08bcac944f6fa30264636dfda8c (patch) | |
tree | a1e6acb7acc68f5d7aa2831ef5f9e31cffa8008a /src/net_processing.cpp | |
parent | 6834e02c896b97ecbd2ad8251c5b09612b27bf10 (diff) | |
download | bitcoin-fae7c0429f96e08bcac944f6fa30264636dfda8c.tar.xz |
log: Clarify that block request below NODE_NETWORK_LIMITED_MIN_BLOCKS disconnects
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r-- | src/net_processing.cpp | 5 |
1 files changed, 1 insertions, 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; |