Merge pull request #5578 from superbaud/powlimit-document

comment explaining the 0x0f0f[..]0f0f powLimit constant for regtest
This commit is contained in:
sasha 2022-03-14 18:47:04 -07:00 committed by GitHub
commit 7071b41c55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -633,7 +633,7 @@ public:
static_assert(equihash_parameters_acceptable(N, K));
consensus.nEquihashN = N;
consensus.nEquihashK = K;
consensus.powLimit = uint256S("0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f");
consensus.powLimit = uint256S("0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f"); // if this is any larger, the for loop in GetNextWorkRequired can overflow bnTot
consensus.nPowAveragingWindow = 17;
assert(maxUint/UintToArith256(consensus.powLimit) >= consensus.nPowAveragingWindow);
consensus.nPowMaxAdjustDown = 0; // Turn off adjustment down