mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-15 16:33:52 +02:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user