Commit 70fe1031 authored by Brannon King's avatar Brannon King
Browse files

added parameters for min difficulty range

parent 1086affa
......@@ -135,6 +135,7 @@ public:
consensus.nExtendedClaimExpirationTime = 2102400;
consensus.nExtendedClaimExpirationForkHeight = 400155;
consensus.fPowAllowMinDifficultyBlocks = false;
consensus.nAllowMinDiffMinHeight = consensus.nAllowMinDiffMaxHeight = -1;
consensus.fPowNoRetargeting = false;
consensus.nNormalizedNameForkHeight = 539940; // targeting 21 March 2019
consensus.nRuleChangeActivationThreshold = 1916; // 95% of 2016
......@@ -223,6 +224,8 @@ public:
consensus.nExtendedClaimExpirationTime = 2102400;
consensus.nExtendedClaimExpirationForkHeight = 278160;
consensus.fPowAllowMinDifficultyBlocks = true;
consensus.nAllowMinDiffMinHeight = 277299;
consensus.nAllowMinDiffMaxHeight = 1100000;
consensus.fPowNoRetargeting = false;
consensus.nNormalizedNameForkHeight = 993380; // targeting, 21 Feb 2019
consensus.nRuleChangeActivationThreshold = 1512; // 75% for testchains
......@@ -304,6 +307,7 @@ public:
consensus.nExtendedClaimExpirationTime = 600;
consensus.nExtendedClaimExpirationForkHeight = 800;
consensus.fPowAllowMinDifficultyBlocks = false;
consensus.nAllowMinDiffMinHeight = consensus.nAllowMinDiffMaxHeight = -1;
consensus.fPowNoRetargeting = false;
consensus.nNormalizedNameForkHeight = 250; // SDK depends upon this number
consensus.nRuleChangeActivationThreshold = 108; // 75% for testchains
......
......@@ -55,6 +55,8 @@ struct Params {
/** Proof of work parameters */
uint256 powLimit;
bool fPowAllowMinDifficultyBlocks;
int nAllowMinDiffMinHeight;
int nAllowMinDiffMaxHeight;
bool fPowNoRetargeting;
int nNormalizedNameForkHeight;
int64_t nPowTargetSpacing;
......
......@@ -18,7 +18,8 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
if (pindexLast == NULL)
return nProofOfWorkLimit;
if (params.fPowAllowMinDifficultyBlocks && pindexLast->nHeight >= 277299 && pindexLast->nHeight < 1100000)
if (params.fPowAllowMinDifficultyBlocks && pindexLast->nHeight >= params.nAllowMinDiffMinHeight
&& pindexLast->nHeight < params.nAllowMinDiffMaxHeight)
{
// Special difficulty rule for testnet:
// If the new block's timestamp is twice the target block time
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment