aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2017-10-11 16:01:51 -0400
committerMarcoFalke <falke.marco@gmail.com>2017-11-02 13:20:45 -0400
commitc6e4d0ce82cfd9fb775ba5ca5874af207585837b (patch)
treec48fc38eeb17af46c9cb054a8d7703e3361c6a31
parente976c36ddf183982d172da3127dc613111a25b42 (diff)
downloadbitcoin-c6e4d0ce82cfd9fb775ba5ca5874af207585837b.tar.xz
Stop always storing blocks from whitelisted peers
There is no reason to wish to store blocks on disk always just because a peer is whitelisted. This appears to be a historical quirk to avoid breaking things when the accept limits were added. Github-Pull: #11531 Rebased-From: 3d9c70ca0fd5d42f31114b689714af1825f0ed30
-rw-r--r--src/net_processing.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 69db5d7428..0697c6bea5 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -2509,11 +2509,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
LogPrint(BCLog::NET, "received block %s peer=%d\n", pblock->GetHash().ToString(), pfrom->GetId());
- // Process all blocks from whitelisted peers, even if not requested,
- // unless we're still syncing with the network.
- // Such an unrequested block may still be processed, subject to the
- // conditions in AcceptBlock().
- bool forceProcessing = pfrom->fWhitelisted && !IsInitialBlockDownload();
+ bool forceProcessing = false;
const uint256 hash(pblock->GetHash());
{
LOCK(cs_main);