mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-18 08:32:30 +01:00
fuzz: exercise ComputeMerkleRoot without mutated parameter
Co-authored-by: sedited <seb.kung@gmail.com>
This commit is contained in:
@@ -52,7 +52,7 @@ FUZZ_TARGET(merkle)
|
||||
|
||||
// Test ComputeMerkleRoot
|
||||
bool mutated = fuzzed_data_provider.ConsumeBool(); // output param, initial value shouldn't matter
|
||||
const uint256 merkle_root = ComputeMerkleRoot(tx_hashes, &mutated);
|
||||
const uint256 merkle_root = ComputeMerkleRoot(tx_hashes, fuzzed_data_provider.ConsumeBool() ? &mutated : nullptr);
|
||||
|
||||
// Basic sanity checks for ComputeMerkleRoot
|
||||
if (tx_hashes.size() == 1) {
|
||||
|
||||
Reference in New Issue
Block a user