Skip to content

Commit 4c71fc4

Browse files
TheBlueMattgmaxwell
authored andcommitted
Remove duplicate nBlocksEstimate cmp (we already checked IsIBD())
Github-Pull: bitcoin#8865 Rebased-From: 0278fb5
1 parent 0a4aa87 commit 4c71fc4

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/main.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3110,13 +3110,10 @@ bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams,
31103110
}
31113111
}
31123112
// Relay inventory, but don't relay old inventory during initial block download.
3113-
int nBlockEstimate = 0;
3114-
if (fCheckpointsEnabled)
3115-
nBlockEstimate = Checkpoints::GetTotalBlocksEstimate(chainparams.Checkpoints());
31163113
{
31173114
LOCK(cs_vNodes);
31183115
BOOST_FOREACH(CNode* pnode, vNodes) {
3119-
if (nNewHeight > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : nBlockEstimate)) {
3116+
if (nNewHeight > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : 0)) {
31203117
BOOST_REVERSE_FOREACH(const uint256& hash, vHashes) {
31213118
pnode->PushBlockHash(hash);
31223119
}

0 commit comments

Comments
 (0)