aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-03-09 16:09:54 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2015-03-09 16:09:54 +0100
commit3aa0130b963087025b64108225bbadea36d8c6df (patch)
tree024f6956d4d5c6df9c9c232a25cfbd6ceb409168
parent59bd89f11636e90b2d684e8f411d8d7a88622458 (diff)
test: remove fSkipProofOfWork
Not used, and REGTEST already allows creating blocks at the lowerst possible difficulty.
-rw-r--r--src/chainparams.cpp1
-rw-r--r--src/chainparams.h3
-rw-r--r--src/main.cpp3
-rw-r--r--src/pow.cpp3
4 files changed, 1 insertions, 9 deletions
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index c48ccbc08a..2bc8976510 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -170,7 +170,6 @@ public:
fAllowMinDifficultyBlocks = false;
fRequireStandard = true;
fMineBlocksOnDemand = false;
- fSkipProofOfWorkCheck = false;
fTestnetToBeDeprecatedFieldRPC = false;
}
diff --git a/src/chainparams.h b/src/chainparams.h
index 48b1383a67..134dcd6558 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -60,8 +60,6 @@ public:
bool DefaultCheckMemPool() const { return fDefaultCheckMemPool; }
/** 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; }
@@ -104,7 +102,6 @@ protected:
bool fAllowMinDifficultyBlocks;
bool fRequireStandard;
bool fMineBlocksOnDemand;
- bool fSkipProofOfWorkCheck;
bool fTestnetToBeDeprecatedFieldRPC;
};
diff --git a/src/main.cpp b/src/main.cpp
index 0b36b5f219..f47155ca90 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2593,8 +2593,7 @@ bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& sta
int nHeight = pindexPrev->nHeight+1;
// 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");
diff --git a/src/pow.cpp b/src/pow.cpp
index b75b293c90..eb899ffc94 100644
--- a/src/pow.cpp
+++ b/src/pow.cpp
@@ -87,9 +87,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