Only enable min-difficulty blocks on testnet from a particular height
The min-difficulty change is a bilateral consensus rule change, and so must be conditionally enabled in order for the earlier section of the chain to synchronise. Technically this could be implemented as a network upgrade, but as this will never be deployed to mainnet, a targeted fork will suffice.
This commit is contained in:
@@ -25,7 +25,8 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
|
||||
return nProofOfWorkLimit;
|
||||
|
||||
{
|
||||
if (params.fPowAllowMinDifficultyBlocks)
|
||||
if (params.nPowAllowMinDifficultyBlocksFromHeight &&
|
||||
pindexLast->nHeight >= params.nPowAllowMinDifficultyBlocksFromHeight.get())
|
||||
{
|
||||
// Special difficulty rule for testnet:
|
||||
// If the new block's timestamp is more than 6 * 2.5 minutes
|
||||
|
||||
Reference in New Issue
Block a user