aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-06-06 17:07:25 +0200
committerMarcoFalke <falke.marco@gmail.com>2020-07-09 12:48:05 +0200
commitfa0540cd46eaf44d9e1a9f91c3a937986826c4fa (patch)
tree1bac883d22116dcb2cf9f65e315de8d1a6c4f148 /src/net_processing.cpp
parentf7c19e829eca10ce8b4acafc61264f8bb9b922f3 (diff)
net: Extract download permission from noban
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r--src/net_processing.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index f1a89a8936..7f89443243 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -1509,7 +1509,7 @@ void static ProcessGetBlockData(CNode& pfrom, const CChainParams& chainparams, c
if (send &&
connman->OutboundTargetReached(true) &&
(((pindexBestHeader != nullptr) && (pindexBestHeader->GetBlockTime() - pindex->GetBlockTime() > HISTORICAL_BLOCK_AGE)) || inv.type == MSG_FILTERED_BLOCK) &&
- !pfrom.HasPermission(PF_NOBAN) // never disconnect nodes with the noban permission
+ !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());
@@ -2739,7 +2739,7 @@ void ProcessMessage(
}
LOCK(cs_main);
- if (::ChainstateActive().IsInitialBlockDownload() && !pfrom.HasPermission(PF_NOBAN)) {
+ if (::ChainstateActive().IsInitialBlockDownload() && !pfrom.HasPermission(PF_DOWNLOAD)) {
LogPrint(BCLog::NET, "Ignoring getheaders from peer=%d because node is in initial block download\n", pfrom.GetId());
return;
}