Merge pull request #1229 from rnicoll/1.10-fork-detection

Update fork detection parameters for Dogecoin block time
This commit is contained in:
Max K. 2015-08-13 18:43:55 +02:00
commit 12cde02eea

View file

@ -1260,12 +1260,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 + (GetBlockProof(*chainActive.Tip()) * 6)))
if (pindexBestForkTip || (pindexBestInvalid && pindexBestInvalid->nChainWork > chainActive.Tip()->nChainWork + (GetBlockProof(*chainActive.Tip()) * 30)))
{
if (!fLargeWorkForkFound && pindexBestForkBase)
{