mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03:00
fuzz: Speed up script fuzz target
This commit is contained in:
parent
2935bd9d67
commit
fa6842978d
1 changed files with 8 additions and 11 deletions
|
@ -102,17 +102,6 @@ FUZZ_TARGET_INIT(script, initialize_script)
|
|||
(void)script.IsPushOnly();
|
||||
(void)script.GetSigOpCount(/* fAccurate= */ false);
|
||||
|
||||
(void)FormatScript(script);
|
||||
(void)ScriptToAsmStr(script, false);
|
||||
(void)ScriptToAsmStr(script, true);
|
||||
|
||||
UniValue o1(UniValue::VOBJ);
|
||||
ScriptPubKeyToUniv(script, o1, true);
|
||||
UniValue o2(UniValue::VOBJ);
|
||||
ScriptPubKeyToUniv(script, o2, false);
|
||||
UniValue o3(UniValue::VOBJ);
|
||||
ScriptToUniv(script, o3);
|
||||
|
||||
{
|
||||
const std::vector<uint8_t> bytes = ConsumeRandomLengthByteVector(fuzzed_data_provider);
|
||||
CompressedScript compressed_script;
|
||||
|
@ -178,4 +167,12 @@ FUZZ_TARGET_INIT(script, initialize_script)
|
|||
Assert(dest == GetScriptForDestination(tx_destination_2));
|
||||
}
|
||||
}
|
||||
|
||||
(void)FormatScript(script);
|
||||
(void)ScriptToAsmStr(script, /*fAttemptSighashDecode=*/fuzzed_data_provider.ConsumeBool());
|
||||
|
||||
UniValue o1(UniValue::VOBJ);
|
||||
ScriptPubKeyToUniv(script, o1, /*include_hex=*/fuzzed_data_provider.ConsumeBool());
|
||||
UniValue o3(UniValue::VOBJ);
|
||||
ScriptToUniv(script, o3);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue