mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-28 16:36:04 +01:00
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:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user