[validation] Introduce IsBlockMutated

This commit is contained in:
dergoegge
2024-01-19 15:09:28 +00:00
parent e7669e1343
commit 66abce1d98
2 changed files with 23 additions and 0 deletions

View File

@@ -383,6 +383,9 @@ bool TestBlockValidity(BlockValidationState& state,
/** Check with the proof of work on each blockheader matches the value in nBits */
bool HasValidProofOfWork(const std::vector<CBlockHeader>& headers, const Consensus::Params& consensusParams);
/** Check if a block has been mutated (with respect to its merkle root and witness commitments). */
bool IsBlockMutated(const CBlock& block, bool check_witness_root);
/** Return the sum of the work on a given set of headers */
arith_uint256 CalculateHeadersWork(const std::vector<CBlockHeader>& headers);