Auto merge of #1004 - str4d:931-difficulty-algorithm, r=ebfull

Implement new difficulty algorithm

Closes #931. Closes #696.
This commit is contained in:
zkbot
2016-06-15 23:26:49 +00:00
6 changed files with 171 additions and 160 deletions

View File

@@ -40,7 +40,9 @@ public:
// TODO generate harder genesis block
//consensus.powLimit = uint256S("00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; // two weeks
consensus.nPowAveragingWindow = 17;
consensus.nPowMaxAdjustDown = 16; // 16% adjustment down
consensus.nPowMaxAdjustUp = 8; // 8% adjustment up
consensus.nPowTargetSpacing = 2.5 * 60;
consensus.fPowAllowMinDifficultyBlocks = false;
/**
@@ -218,6 +220,8 @@ public:
consensus.nMajorityRejectBlockOutdated = 950;
consensus.nMajorityWindow = 1000;
consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
consensus.nPowMaxAdjustDown = 0; // Turn off adjustment down
consensus.nPowMaxAdjustUp = 0; // Turn off adjustment up
pchMessageStart[0] = 0xaa;
pchMessageStart[1] = 0xe8;
pchMessageStart[2] = 0x3f;