Skip to content

Commit 0278fb5

Browse files
committed
Remove duplicate nBlocksEstimate cmp (we already checked IsIBD())
1 parent 87e7d72 commit 0278fb5

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/main.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3087,12 +3087,9 @@ bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams,
30873087
}
30883088
}
30893089
// Relay inventory, but don't relay old inventory during initial block download.
3090-
int nBlockEstimate = 0;
3091-
if (fCheckpointsEnabled)
3092-
nBlockEstimate = Checkpoints::GetTotalBlocksEstimate(chainparams.Checkpoints());
30933090
if(connman) {
3094-
connman->ForEachNode([nNewHeight, nBlockEstimate, &vHashes](CNode* pnode) {
3095-
if (nNewHeight > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : nBlockEstimate)) {
3091+
connman->ForEachNode([nNewHeight, &vHashes](CNode* pnode) {
3092+
if (nNewHeight > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : 0)) {
30963093
BOOST_REVERSE_FOREACH(const uint256& hash, vHashes) {
30973094
pnode->PushBlockHash(hash);
30983095
}

0 commit comments

Comments
 (0)