mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
Merge pull request #4845
4705902Avoid introducing a virtual into CChainParams (Wladimir J. van der Laan)5e2e7fcSuggested corrections on comments, variable names. Also new test case testing the PoW skip in UNITTEST. (SergioDemianLerner)a25fd6bSwitch testing framework from MAIN to new UNITTEST network (SergioDemianLerner)
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user