Merge pull request #614 from rnicoll/1.8-dev-forkwarn

Adjust trigger conditions for safe mode to suit Dogecoin block time
This commit is contained in:
langerhans 2014-08-17 20:15:11 +02:00
commit 51f69a5a5e

View file

@ -1436,12 +1436,12 @@ void CheckForkWarningConditions()
if (IsInitialBlockDownload())
return;
// If our best fork is no longer within 72 blocks (+/- 12 hours if no one mines it)
// If our best fork is no longer within 360 blocks (+/- 6 hours if no one mines it)
// of our head, drop it
if (pindexBestForkTip && chainActive.Height() - pindexBestForkTip->nHeight >= 72)
if (pindexBestForkTip && chainActive.Height() - pindexBestForkTip->nHeight >= 360)
pindexBestForkTip = NULL;
if (pindexBestForkTip || (pindexBestInvalid && pindexBestInvalid->nChainWork > chainActive.Tip()->nChainWork + (chainActive.Tip()->GetBlockWork() * 6).getuint256()))
if (pindexBestForkTip || (pindexBestInvalid && pindexBestInvalid->nChainWork > chainActive.Tip()->nChainWork + (chainActive.Tip()->GetBlockWork() * 30).getuint256()))
{
if (!fLargeWorkForkFound)
{