fuzz: remove redundant CScript method calls from script harness

The script harness was calling GetSigOpCount, HasValidOps,
IsPayToAnchor, IsPayToScriptHash, IsPayToWitnessScriptHash, and
IsPushOnly on the fuzzed CScript. All of these are already covered
by the script_ops harness, which is the dedicated harness for
CScript member methods.

Also add the missing IsPayToAnchor call to script_ops so the move
preserves coverage.
This commit is contained in:
Bruno Garcia
2026-04-16 09:53:25 -03:00
parent 89e7c4274c
commit c9d8582235
2 changed files with 1 additions and 7 deletions

View File

@@ -93,13 +93,6 @@ FUZZ_TARGET(script, .init = initialize_script)
std::vector<std::vector<unsigned char>> solutions;
(void)Solver(script, solutions);
(void)script.HasValidOps();
(void)script.IsPayToAnchor();
(void)script.IsPayToScriptHash();
(void)script.IsPayToWitnessScriptHash();
(void)script.IsPushOnly();
(void)script.GetSigOpCount(/* fAccurate= */ false);
{
const std::vector<uint8_t> bytes = ConsumeRandomLengthByteVector(fuzzed_data_provider);
CompressedScript compressed_script;