diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2012-03-20 13:45:45 -0400 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2012-03-20 13:45:45 -0400 |
commit | eae82d8ee5ce95e4f87d4fdafcb00ecce5b533a9 (patch) | |
tree | 7ba6bfd4d7aee84ebf1a297d915e355fa96467b0 /src | |
parent | 3f1bb1ac788cd8a9b39a06f4c8fa48b466dda1d2 (diff) |
Use last checkpoint instead of hard-coded 140,700. Fixes #913.
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 1209f6e568..babdf88f77 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1706,10 +1706,11 @@ bool CBlock::AcceptBlock() return error("AcceptBlock() : AddToBlockIndex failed"); // Relay inventory, but don't relay old inventory during initial block download + int nBlockEstimate = Checkpoints::GetTotalBlocksEstimate(); if (hashBestChain == hash) CRITICAL_BLOCK(cs_vNodes) BOOST_FOREACH(CNode* pnode, vNodes) - if (nBestHeight > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : 140700)) + if (nBestHeight > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : nBlockEstimate)) pnode->PushInventory(CInv(MSG_BLOCK, hash)); return true; |