Skip to content

Commit fae7c04

Browse files
author
MarcoFalke
committed
log: Clarify that block request below NODE_NETWORK_LIMITED_MIN_BLOCKS disconnects
1 parent 6834e02 commit fae7c04

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/net_processing.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1580,17 +1580,14 @@ void PeerManagerImpl::ProcessGetBlockData(CNode& pfrom, Peer& peer, const CInv&
15801580
!pfrom.HasPermission(PF_DOWNLOAD) // nodes with the download permission may exceed target
15811581
) {
15821582
LogPrint(BCLog::NET, "historical block serving limit reached, disconnect peer=%d\n", pfrom.GetId());
1583-
1584-
//disconnect node
15851583
pfrom.fDisconnect = true;
15861584
send = false;
15871585
}
15881586
// Avoid leaking prune-height by never sending blocks below the NODE_NETWORK_LIMITED threshold
15891587
if (send && !pfrom.HasPermission(PF_NOBAN) && (
15901588
(((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 */) )
15911589
)) {
1592-
LogPrint(BCLog::NET, "Ignore block request below NODE_NETWORK_LIMITED threshold from peer=%d\n", pfrom.GetId());
1593-
1590+
LogPrint(BCLog::NET, "Ignore block request below NODE_NETWORK_LIMITED threshold, disconnect peer=%d\n", pfrom.GetId());
15941591
//disconnect node and prevent it from stalling (would otherwise wait for the missing block)
15951592
pfrom.fDisconnect = true;
15961593
send = false;

0 commit comments

Comments
 (0)