diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-10-02 09:47:53 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-10-02 09:47:54 +0200 |
commit | ad51e14583fbf6d53d5a2b22a0a0dbe4a51a9a7d (patch) | |
tree | 5371fd7c8eaaf0260db119f4d334bf8aab256087 /src/main.cpp | |
parent | 3b390723c16d13271ee2675aff013fdd95d39c18 (diff) | |
parent | 470590277782cce2fe73275c74523aef59a51eab (diff) |
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.cpp | 3 |
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"); |