mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-23 07:15:29 +01:00
log: Clarify that block request below NODE_NETWORK_LIMITED_MIN_BLOCKS disconnects
This commit is contained in:
parent
6834e02c89
commit
fae7c0429f
1 changed files with 1 additions and 4 deletions
|
@ -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
|
!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());
|
LogPrint(BCLog::NET, "historical block serving limit reached, disconnect peer=%d\n", pfrom.GetId());
|
||||||
|
|
||||||
//disconnect node
|
|
||||||
pfrom.fDisconnect = true;
|
pfrom.fDisconnect = true;
|
||||||
send = false;
|
send = false;
|
||||||
}
|
}
|
||||||
|
@ -1589,8 +1587,7 @@ void PeerManagerImpl::ProcessGetBlockData(CNode& pfrom, Peer& peer, const CInv&
|
||||||
if (send && !pfrom.HasPermission(PF_NOBAN) && (
|
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 */) )
|
(((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)
|
//disconnect node and prevent it from stalling (would otherwise wait for the missing block)
|
||||||
pfrom.fDisconnect = true;
|
pfrom.fDisconnect = true;
|
||||||
send = false;
|
send = false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue