Suggested corrections on comments, variable names.

Also new test case testing the PoW skip in UNITTEST.
This commit is contained in:
SergioDemianLerner
2014-09-09 13:29:24 -03:00
committed by Wladimir J. van der Laan
parent a25fd6be13
commit 5e2e7fcb99
3 changed files with 91 additions and 48 deletions

View File

@@ -2304,8 +2304,8 @@ bool AcceptBlockHeader(CBlockHeader& block, CValidationState& state, CBlockIndex
nHeight = pindexPrev->nHeight+1;
// Check proof of work
if (!Params().SkipProofOfWorkCheck())
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");