mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-21 11:25:46 +02:00
Merge bitcoin/bitcoin#35127: fuzz: remove redundant CScript method calls from script harness
c9d8582235fuzz: remove redundant CScript method calls from script harness (Bruno Garcia) Pull request description: 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. ACKs for top commit: maflcko: lgtm ACKc9d8582235Tree-SHA512: f69c9f217b5422e24714f985a8c0f7fcfb2c1b1e9117a0e54e7d31139bedfec9279a756ceb9b8860f7574b7cf59fb17c1063596176de8de4800824dc7866f33c
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;
|
||||
|
||||
@@ -48,6 +48,7 @@ FUZZ_TARGET(script_ops)
|
||||
(void)script.GetSigOpCount(script);
|
||||
(void)script.HasValidOps();
|
||||
(void)script.IsPayToScriptHash();
|
||||
(void)script.IsPayToAnchor();
|
||||
(void)script.IsPayToWitnessScriptHash();
|
||||
(void)script.IsPushOnly();
|
||||
(void)script.IsUnspendable();
|
||||
|
||||
Reference in New Issue
Block a user