Browse Source

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.
0.16
Matt Corallo 7 years ago
parent
commit
3d9c70ca0f
  1. 6
      src/net_processing.cpp

6
src/net_processing.cpp

@ -2480,11 +2480,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()); LogPrint(BCLog::NET, "received block %s peer=%d\n", pblock->GetHash().ToString(), pfrom->GetId());
// Process all blocks from whitelisted peers, even if not requested, bool forceProcessing = false;
// 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();
const uint256 hash(pblock->GetHash()); const uint256 hash(pblock->GetHash());
{ {
LOCK(cs_main); LOCK(cs_main);

Loading…
Cancel
Save