mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-30 18:35:54 +02: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
|
// Test ComputeMerkleRoot
|
||||||
bool mutated = fuzzed_data_provider.ConsumeBool(); // output param, initial value shouldn't matter
|
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
|
// Basic sanity checks for ComputeMerkleRoot
|
||||||
if (tx_hashes.size() == 1) {
|
if (tx_hashes.size() == 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user