aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-10-02 09:47:53 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-10-02 09:47:54 +0200
commitad51e14583fbf6d53d5a2b22a0a0dbe4a51a9a7d (patch)
tree5371fd7c8eaaf0260db119f4d334bf8aab256087 /src/main.cpp
parent3b390723c16d13271ee2675aff013fdd95d39c18 (diff)
parent470590277782cce2fe73275c74523aef59a51eab (diff)
downloadbitcoin-ad51e14583fbf6d53d5a2b22a0a0dbe4a51a9a7d.tar.xz
Merge pull request #4845
4705902 Avoid introducing a virtual into CChainParams (Wladimir J. van der Laan) 5e2e7fc Suggested corrections on comments, variable names. Also new test case testing the PoW skip in UNITTEST. (SergioDemianLerner) a25fd6b Switch testing framework from MAIN to new UNITTEST network (SergioDemianLerner)
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index a3e36ff872..55485c86ff 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2305,7 +2305,8 @@ bool AcceptBlockHeader(CBlockHeader& block, CValidationState& state, CBlockIndex
nHeight = pindexPrev->nHeight+1;
// Check proof of work
- if (block.nBits != GetNextWorkRequired(pindexPrev, &block))
+ if ((!Params().SkipProofOfWorkCheck()) &&
+ (block.nBits != GetNextWorkRequired(pindexPrev, &block)))
return state.DoS(100, error("AcceptBlock() : incorrect proof of work"),
REJECT_INVALID, "bad-diffbits");