| 3558 | } |
| 3559 | |
| 3560 | static bool CheckBlockHeader(const CBlockHeader& block, BlockValidationState& state, const Consensus::Params& consensusParams, bool fCheckPOW = true) |
| 3561 | { |
| 3562 | // Check proof of work matches claimed amount |
| 3563 | if (fCheckPOW && block.GetHash() != consensusParams.hashGenesisBlock |
| 3564 | && !CheckProof(block, consensusParams)) { |
| 3565 | return state.Invalid(BlockValidationResult::BLOCK_INVALID_HEADER, g_signed_blocks ? "block-proof-invalid" : "high-hash", "proof of work failed"); |
| 3566 | } |
| 3567 | return true; |
| 3568 | } |
| 3569 | |
| 3570 | bool CheckBlock(const CBlock& block, BlockValidationState& state, const Consensus::Params& consensusParams, bool fCheckPOW, bool fCheckMerkleRoot) |
| 3571 | { |
no test coverage detected