Skip to content

Commit

Permalink
BUG: Fix TestBlockValidity for PoW blocks
Browse files Browse the repository at this point in the history
Especially in CreateNewBlock, where the proper nonce hasn't been mined
yet

Github-Pull: #2067
Rebased-From: a6ea4e1
  • Loading branch information
random-zebra authored and Fuzzbawls committed Dec 19, 2020
1 parent 1466f0b commit 25e2816
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2703,7 +2703,7 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo

// Check that the header is valid (particularly PoW). This is mostly
// redundant with the call in AcceptBlockHeader.
if (!CheckBlockHeader(block, state, !IsPoS))
if (!CheckBlockHeader(block, state, !IsPoS && fCheckPOW))
return false;

// All potential-corruption validation must be done before we do any
Expand Down

0 comments on commit 25e2816

Please sign in to comment.