Skip to content

Commit

Permalink
Make RegTest use simplified rewards for easier test vector setup and …
Browse files Browse the repository at this point in the history
…use short block times
  • Loading branch information
langerhans committed Jul 31, 2015
1 parent 65e484f commit 9b58d31
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,17 +285,19 @@ class CRegTestParams : public CTestNetParams {
consensus.nMajorityRejectBlockOutdated = 950;
consensus.nMajorityWindow = 1000;
consensus.nPowTargetTimespan = 4 * 60 * 60; // pre-digishield: 4 hours
consensus.nPowTargetSpacing = 1; // regtest: 1 second blocks
consensus.powLimit = uint256S("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); // ~uint256(0) >> 1;
consensus.fStrictChainId = true;
consensus.fAllowLegacyBlocks = false; // Never allow legacy blocks on RegTest
consensus.fSimplifiedRewards = true;

// Reset links before we copy parameters
consensus.pLeft = NULL;
consensus.pRight = NULL;

digishieldConsensus = consensus;
digishieldConsensus.nHeightEffective = 10;
digishieldConsensus.nPowTargetTimespan = 60; // post-digishield: 1 minute
digishieldConsensus.nPowTargetTimespan = 1; // // regtest: also retarget every second in digishield mode, for conformity
digishieldConsensus.fDigishieldDifficultyCalculation = true;

auxpowConsensus = digishieldConsensus;
Expand Down

0 comments on commit 9b58d31

Please sign in to comment.