aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorSergioDemianLerner <Sergio.d.Lerner@gmail.com>2014-09-09 13:29:24 -0300
committerWladimir J. van der Laan <laanwj@gmail.com>2014-09-29 13:03:23 +0200
commit5e2e7fcb99738d9254d4030d53e4f711b2fc5ee0 (patch)
tree29771cbc64ca959ec8446dbed7436ac44a86475f /src/main.cpp
parenta25fd6be138ff2bff7e2ad6a1a789db523c0193f (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.cpp4
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");