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
  • Loading branch information
random-zebra committed Dec 17, 2020
1 parent 84ca60a commit a6ea4e1
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 a6ea4e1

Please sign in to comment.