diff options
| author | Jonas Schnelli <[email protected]> | 2015-11-11 10:10:48 +0100 |
|---|---|---|
| committer | Jonas Schnelli <[email protected]> | 2015-11-13 21:04:12 +0100 |
| commit | d61fcff07112411a1e7c28984777480e0c0873aa (patch) | |
| tree | aeeba1fe49bc8b2cddf6fc6925e4f56adb02b47e /src/main.cpp | |
| parent | Merge pull request #6990 (diff) | |
| download | discoin-d61fcff07112411a1e7c28984777480e0c0873aa.tar.xz discoin-d61fcff07112411a1e7c28984777480e0c0873aa.zip | |
don't enforce maxuploadtargets disconnect for whitelisted peers
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 5208fbb03..4647112d4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3867,8 +3867,9 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam } } // disconnect node in case we have reached the outbound limit for serving historical blocks + // never disconnect whitelisted nodes static const int nOneWeek = 7 * 24 * 60 * 60; // assume > 1 week = historical - if (send && CNode::OutboundTargetReached(true) && ( ((pindexBestHeader != NULL) && (pindexBestHeader->GetBlockTime() - mi->second->GetBlockTime() > nOneWeek)) || inv.type == MSG_FILTERED_BLOCK) ) + if (send && CNode::OutboundTargetReached(true) && ( ((pindexBestHeader != NULL) && (pindexBestHeader->GetBlockTime() - mi->second->GetBlockTime() > nOneWeek)) || inv.type == MSG_FILTERED_BLOCK) && !pfrom->fWhitelisted) { LogPrint("net", "historical block serving limit reached, disconnect peer=%d\n", pfrom->GetId()); |