fuzz: exercise ComputeMerkleRoot without mutated parameter

Co-authored-by: sedited <seb.kung@gmail.com>
This commit is contained in:
Lőrinc
2025-12-11 12:47:18 +01:00
parent b26762bdcb
commit 7e9de20c0c

View File

@@ -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) {