diff options
author | SergioDemianLerner <Sergio.d.Lerner@gmail.com> | 2014-09-09 13:29:24 -0300 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-09-29 13:03:23 +0200 |
commit | 5e2e7fcb99738d9254d4030d53e4f711b2fc5ee0 (patch) | |
tree | 29771cbc64ca959ec8446dbed7436ac44a86475f /src/main.cpp | |
parent | a25fd6be138ff2bff7e2ad6a1a789db523c0193f (diff) |
Suggested corrections on comments, variable names.
Also new test case testing the PoW skip in UNITTEST.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 4bd8fd6e36..7e60fd4ff9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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"); |