added parameters for min difficulty range
This commit is contained in:
parent
1086affae0
commit
70fe103184
3 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue