merkle: remove unused mutated arg from BlockWitnessMerkleRoot

The `mutated` parameter is never used at any call site - all callers pass `nullptr`.
The explicit comment in `validation.cpp` explains the reason:
// The malleation check is ignored; as the transaction tree itself
// already does not permit it, it is impossible to trigger in the
// witness tree.
This commit is contained in:
Lőrinc
2025-11-06 11:26:17 +01:00
parent 63d640fa6a
commit 24ed820d4f
4 changed files with 7 additions and 8 deletions

View File

@@ -51,7 +51,7 @@ FUZZ_TARGET(merkle)
}
// Test ComputeMerkleRoot
bool mutated = fuzzed_data_provider.ConsumeBool();
bool mutated = fuzzed_data_provider.ConsumeBool(); // output param, initial value shouldn't matter
const uint256 merkle_root = ComputeMerkleRoot(tx_hashes, &mutated);
// Basic sanity checks for ComputeMerkleRoot
@@ -66,7 +66,7 @@ FUZZ_TARGET(merkle)
}
if (!block->vtx.empty()){
const uint256 block_witness_merkle_root = BlockWitnessMerkleRoot(*block, &mutated);
const uint256 block_witness_merkle_root = BlockWitnessMerkleRoot(*block);
if (tx_hashes.size() == 1) {
assert(block_witness_merkle_root == uint256());
}