Commit c5d073d6 authored by Wladimir J. van der Laan's avatar Wladimir J. van der Laan Committed by infernoman
Browse files

test: remove fSkipProofOfWork

Not used, and REGTEST already allows creating blocks at
the lowerst possible difficulty.
parent 96153ffa
Showing with 1 addition and 9 deletions
+1 -9
......@@ -176,7 +176,6 @@ public:
fDefaultConsistencyChecks = false;
fRequireStandard = true;
fMineBlocksOnDemand = false;
fSkipProofOfWorkCheck = false;
fTestnetToBeDeprecatedFieldRPC = false;
nPoolMaxTransactions = 3;
......
......@@ -61,8 +61,6 @@ public:
bool DefaultConsistencyChecks() const { return fDefaultConsistencyChecks; }
/** Allow mining of a min-difficulty block */
bool AllowMinDifficultyBlocks() const { return fAllowMinDifficultyBlocks; }
/** Skip proof-of-work check: allow mining of any difficulty block */
bool SkipProofOfWorkCheck() const { return fSkipProofOfWorkCheck; }
/** Make standard checks */
bool RequireStandard() const { return fRequireStandard; }
int64_t TargetTimespan() const { return nTargetTimespan; }
......@@ -123,7 +121,6 @@ protected:
bool fDefaultConsistencyChecks;
bool fRequireStandard;
bool fMineBlocksOnDemand;
bool fSkipProofOfWorkCheck;
bool fTestnetToBeDeprecatedFieldRPC;
int nPoolMaxTransactions;
std::string strSporkKey;
......
......@@ -3060,8 +3060,7 @@ bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& sta
REJECT_INVALID, "late-legacy-block");
// Check proof of work
if ((!Params().SkipProofOfWorkCheck()) &&
(block.nBits != GetNextWorkRequired(pindexPrev, &block)))
if ((block.nBits != GetNextWorkRequired(pindexPrev, &block)))
return state.DoS(100, error("%s : incorrect proof of work", __func__),
REJECT_INVALID, "bad-diffbits");
......
......@@ -230,9 +230,6 @@ bool CheckProofOfWork(uint256 hash, unsigned int nBits)
bool fOverflow;
arith_uint256 bnTarget;
if (Params().SkipProofOfWorkCheck())
return true;
bnTarget.SetCompact(nBits, &fNegative, &fOverflow);
// Check range
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment