aboutsummaryrefslogtreecommitdiff
path: root/src/validation.h
diff options
context:
space:
mode:
authordergoegge <n.goeggi@gmail.com>2024-01-19 15:09:28 +0000
committerdergoegge <n.goeggi@gmail.com>2024-02-27 14:19:15 +0000
commit66abce1d98115e41f394bc4f4f52341960ddc839 (patch)
tree80611efddb649953aee260eadb441e7acbfe11a7 /src/validation.h
parente7669e1343aec4298fd30d539847963e6fa5619c (diff)
downloadbitcoin-66abce1d98115e41f394bc4f4f52341960ddc839.tar.xz
[validation] Introduce IsBlockMutated
Diffstat (limited to 'src/validation.h')
-rw-r--r--src/validation.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/validation.h b/src/validation.h
index fd9b53df8f..566153c150 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -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);