diff options
| author | SergioDemianLerner <[email protected]> | 2014-09-09 13:29:24 -0300 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2014-09-29 13:03:23 +0200 |
| commit | 5e2e7fcb99738d9254d4030d53e4f711b2fc5ee0 (patch) | |
| tree | 29771cbc64ca959ec8446dbed7436ac44a86475f /src/main.cpp | |
| parent | Switch testing framework from MAIN to new UNITTEST network (diff) | |
| download | discoin-5e2e7fcb99738d9254d4030d53e4f711b2fc5ee0.tar.xz discoin-5e2e7fcb99738d9254d4030d53e4f711b2fc5ee0.zip | |
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 4bd8fd6e3..7e60fd4ff 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"); |