aboutsummaryrefslogtreecommitdiff
path: root/src/pow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pow.cpp')
-rw-r--r--src/pow.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/pow.cpp b/src/pow.cpp
index a8d0efdab..8bbb66a70 100644
--- a/src/pow.cpp
+++ b/src/pow.cpp
@@ -21,8 +21,21 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
if (pindexLast == NULL)
return nProofOfWorkLimit;
+ // Dogecoin: Special rules for minimum difficulty blocks with Digishield
+ if (AllowDigishieldMinDifficultyForBlock(pindexLast, pblock, params))
+ {
+ // Special difficulty rule for testnet:
+ // If the new block's timestamp is more than 2* nTargetSpacing minutes
+ // then allow mining of a min-difficulty block.
+ return nProofOfWorkLimit;
+ }
+
// Only change once per difficulty adjustment interval
- if ((pindexLast->nHeight+1) % params.DifficultyAdjustmentInterval() != 0)
+ bool fNewDifficultyProtocol = (pindexLast->nHeight >= 145000);
+ const int64_t difficultyAdjustmentInterval = fNewDifficultyProtocol
+ ? 1
+ : params.DifficultyAdjustmentInterval();
+ if ((pindexLast->nHeight+1) % difficultyAdjustmentInterval != 0)
{
if (params.fPowAllowMinDifficultyBlocks)
{