Browse Source

Remove duplicate nBlocksEstimate cmp (we already checked IsIBD())

0.14
Matt Corallo 8 years ago
parent
commit
0278fb5f48
  1. 7
      src/main.cpp

7
src/main.cpp

@ -3087,12 +3087,9 @@ bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams, @@ -3087,12 +3087,9 @@ bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams,
}
}
// Relay inventory, but don't relay old inventory during initial block download.
int nBlockEstimate = 0;
if (fCheckpointsEnabled)
nBlockEstimate = Checkpoints::GetTotalBlocksEstimate(chainparams.Checkpoints());
if(connman) {
connman->ForEachNode([nNewHeight, nBlockEstimate, &vHashes](CNode* pnode) {
if (nNewHeight > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : nBlockEstimate)) {
connman->ForEachNode([nNewHeight, &vHashes](CNode* pnode) {
if (nNewHeight > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : 0)) {
BOOST_REVERSE_FOREACH(const uint256& hash, vHashes) {
pnode->PushBlockHash(hash);
}

Loading…
Cancel
Save