mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
fuzz: [refactor] Use IsValidFlagCombination in signature_checker fuzz target
Can be reviewed with --color-moved=dimmed-zebra
This commit is contained in:
parent
eeee8f5be1
commit
fa4926cca6
5 changed files with 20 additions and 14 deletions
|
|
@ -5,13 +5,11 @@
|
|||
#include <pubkey.h>
|
||||
#include <script/interpreter.h>
|
||||
#include <streams.h>
|
||||
#include <test/util/script.h>
|
||||
#include <version.h>
|
||||
|
||||
#include <test/fuzz/fuzz.h>
|
||||
|
||||
/** Flags that are not forbidden by an assert */
|
||||
static bool IsValidFlagCombination(unsigned flags);
|
||||
|
||||
void initialize_script_flags()
|
||||
{
|
||||
static const ECCVerifyHandle verify_handle;
|
||||
|
|
@ -74,10 +72,3 @@ FUZZ_TARGET_INIT(script_flags, initialize_script_flags)
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
static bool IsValidFlagCombination(unsigned flags)
|
||||
{
|
||||
if (flags & SCRIPT_VERIFY_CLEANSTACK && ~flags & (SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS)) return false;
|
||||
if (flags & SCRIPT_VERIFY_WITNESS && ~flags & SCRIPT_VERIFY_P2SH) return false;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue