diff options
| author | Ross Nicoll <[email protected]> | 2014-08-17 13:46:55 +0100 |
|---|---|---|
| committer | Ross Nicoll <[email protected]> | 2014-08-17 13:46:55 +0100 |
| commit | 02ab973c222ae9873f1858b6bfab09adc99224a2 (patch) | |
| tree | 126bde01016c0562333719af2197eeaaf9352c3c /src/main.cpp | |
| parent | Merge pull request #604 from whitj00/patch-3 (diff) | |
| download | discoin-02ab973c222ae9873f1858b6bfab09adc99224a2.tar.xz discoin-02ab973c222ae9873f1858b6bfab09adc99224a2.zip | |
Adjust trigger conditions for safe mode to suit Dogecoin block time.
Values for triggering safe mode are time sensitive, and have not been
modified to take into account the differing block times between Bitcoin and
Dogecoin. This patch changes the interval across which a fork must exist to
override any other fork to 6 hours, and increases the number of blocks an
invalid fork must have before it trips safe mode.
This should help mitigate disruption in the 1.7/1.8 hard fork, but miners will
still need to run with -disablesafemode for the preceeding and following 2-3
days to be sure.
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index da1f12cdc..c806a80a3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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) { |