doc: noban precludes maxuploadtarget disconnects

This commit is contained in:
MarcoFalke
2020-05-21 10:42:37 -04:00
parent fa3999fe35
commit fa9604c46f
5 changed files with 7 additions and 9 deletions

View File

@@ -1509,11 +1509,10 @@ void static ProcessGetBlockData(CNode& pfrom, const CChainParams& chainparams, c
}
const CNetMsgMaker msgMaker(pfrom.GetSendVersion());
// disconnect node in case we have reached the outbound limit for serving historical blocks
// never disconnect whitelisted nodes
if (send &&
connman->OutboundTargetReached(true) &&
(((pindexBestHeader != nullptr) && (pindexBestHeader->GetBlockTime() - pindex->GetBlockTime() > HISTORICAL_BLOCK_AGE)) || inv.type == MSG_FILTERED_BLOCK) &&
!pfrom.HasPermission(PF_NOBAN)
!pfrom.HasPermission(PF_NOBAN) // never disconnect nodes with the noban permission
) {
LogPrint(BCLog::NET, "historical block serving limit reached, disconnect peer=%d\n", pfrom.GetId());