Skip to content

Commit

Permalink
Update fork detection parameters for Dogecoin block time
Browse files Browse the repository at this point in the history
I've multiplied fork detection parameters by 5 - the wall clock time elapsed for "long" forks
is therefore half that of Bitcoin, but IMHO those figures are excessive for a chain with 1
minute block times.
  • Loading branch information
Ross Nicoll committed Aug 7, 2015
1 parent 8cd835c commit 0e4f62a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1257,12 +1257,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)
{
Expand Down

0 comments on commit 0e4f62a

Please sign in to comment.