@ -3115,7 +3115,7 @@ static bool AcceptBlock(const std::shared_ptr<const CBlock>& pblock, CValidation
@@ -3115,7 +3115,7 @@ static bool AcceptBlock(const std::shared_ptr<const CBlock>& pblock, CValidation
// process an unrequested block if it's new and has enough work to
// advance our tip, and isn't too many blocks ahead.
bool fAlreadyHave = pindex - > nStatus & BLOCK_HAVE_DATA ;
bool fHasMoreWork = ( chainActive . Tip ( ) ? pindex - > nChainWork > chainActive . Tip ( ) - > nChainWork : true ) ;
bool fHasMoreOrSame Work = ( chainActive . Tip ( ) ? pindex - > nChainWork > = chainActive . Tip ( ) - > nChainWork : true ) ;
// Blocks that are too out-of-order needlessly limit the effectiveness of
// pruning, because pruning will not delete block files that contain any
// blocks which are too close in height to the tip. Apply this test
@ -3132,9 +3132,9 @@ static bool AcceptBlock(const std::shared_ptr<const CBlock>& pblock, CValidation
@@ -3132,9 +3132,9 @@ static bool AcceptBlock(const std::shared_ptr<const CBlock>& pblock, CValidation
// and unrequested blocks.
if ( fAlreadyHave ) return true ;
if ( ! fRequested ) { // If we didn't ask for it:
if ( pindex - > nTx ! = 0 ) return true ; // This is a previously-processed block that was pruned
if ( ! fHasMoreWork ) return true ; // Don't process less-work chains
if ( fTooFarAhead ) return true ; // Block height is too high
if ( pindex - > nTx ! = 0 ) return true ; // This is a previously-processed block that was pruned
if ( ! fHasMoreOrSame Work ) return true ; // Don't process less-work chains
if ( fTooFarAhead ) return true ; // Block height is too high
// Protect against DoS attacks from low-work chains.
// If our tip is behind, a peer could try to send us