aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2016-09-30 18:19:57 -0400
committerGregory Maxwell <greg@xiph.org>2016-12-06 17:09:50 +0000
commit4c71fc42fbf32d8994f4d2488ac4bafad93226a1 (patch)
tree83f52117fbe8d91cbd3b43eca7e51ca5011b409b
parent0a4aa876230c602427aa40b47a84698a3fd28e85 (diff)
downloadbitcoin-4c71fc42fbf32d8994f4d2488ac4bafad93226a1.tar.xz
Remove duplicate nBlocksEstimate cmp (we already checked IsIBD())
Github-Pull: #8865 Rebased-From: 0278fb5f48ae9e42ec0772f85e201051077f633c
-rw-r--r--src/main.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 191bcff4cc..cfc616201d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3110,13 +3110,10 @@ 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());
{
LOCK(cs_vNodes);
BOOST_FOREACH(CNode* pnode, vNodes) {
- if (nNewHeight > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : nBlockEstimate)) {
+ if (nNewHeight > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : 0)) {
BOOST_REVERSE_FOREACH(const uint256& hash, vHashes) {
pnode->PushBlockHash(hash);
}