diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-03-30 09:32:35 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-03-30 10:42:45 +0200 |
commit | fa4926cca68db2433e579d9b4a642248a9314673 (patch) | |
tree | 882ddae72fde111eb8c5785c872c46f6cba0f496 /src/test/fuzz/script_flags.cpp | |
parent | eeee8f5be1d4ccfb7e237248be5c6bef45b0fbb8 (diff) | |
download | bitcoin-fa4926cca68db2433e579d9b4a642248a9314673.tar.xz |
fuzz: [refactor] Use IsValidFlagCombination in signature_checker fuzz target
Can be reviewed with --color-moved=dimmed-zebra
Diffstat (limited to 'src/test/fuzz/script_flags.cpp')
-rw-r--r-- | src/test/fuzz/script_flags.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/test/fuzz/script_flags.cpp b/src/test/fuzz/script_flags.cpp index 561230707c..387f9c069c 100644 --- a/src/test/fuzz/script_flags.cpp +++ b/src/test/fuzz/script_flags.cpp @@ -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; -} |