From: Gavin Andresen Date: Tue, 20 Mar 2012 17:45:45 +0000 (-0400) Subject: Use last checkpoint instead of hard-coded 140,700. Fixes #913. X-Git-Tag: v0.4.0-unstable~129^2~150^2 X-Git-Url: https://git.novaco.in/?a=commitdiff_plain;h=eae82d8ee5ce95e4f87d4fdafcb00ecce5b533a9;hp=3f1bb1ac788cd8a9b39a06f4c8fa48b466dda1d2;p=novacoin.git Use last checkpoint instead of hard-coded 140,700. Fixes #913. --- diff --git a/src/main.cpp b/src/main.cpp index 1209f6e..babdf88 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;