diff options
| author | Gavin Andresen <[email protected]> | 2012-03-20 13:45:45 -0400 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2012-03-20 13:45:45 -0400 |
| commit | eae82d8ee5ce95e4f87d4fdafcb00ecce5b533a9 (patch) | |
| tree | 7ba6bfd4d7aee84ebf1a297d915e355fa96467b0 /src | |
| parent | Proper support for Growl 1.3 notifications (diff) | |
| download | discoin-eae82d8ee5ce95e4f87d4fdafcb00ecce5b533a9.tar.xz discoin-eae82d8ee5ce95e4f87d4fdafcb00ecce5b533a9.zip | |
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 1209f6e56..babdf88f7 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; |