diff options
author | Michael Dietz <michael.dietz@waya.ai> | 2020-12-24 13:48:30 -0600 |
---|---|---|
committer | Michael Dietz <michael.dietz@waya.ai> | 2020-12-28 19:31:23 -0600 |
commit | efaf80e9bb0afeca2955720bfe6c225d7864036b (patch) | |
tree | 5449ac40a755498904584e83630521746b9425c5 /src/test | |
parent | 43fc7a569c135a9f24db23e6fcbb30b839859094 (diff) |
fuzz: check that certain script TxoutType are nonstandard
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/fuzz/script.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/test/fuzz/script.cpp b/src/test/fuzz/script.cpp index f43689290a..d883426c81 100644 --- a/src/test/fuzz/script.cpp +++ b/src/test/fuzz/script.cpp @@ -71,7 +71,15 @@ FUZZ_TARGET_INIT(script, initialize_script) (void)IsSolvable(signing_provider, script); TxoutType which_type; - (void)IsStandard(script, which_type); + bool is_standard_ret = IsStandard(script, which_type); + if (!is_standard_ret) { + assert(which_type == TxoutType::NONSTANDARD || + which_type == TxoutType::NULL_DATA || + which_type == TxoutType::MULTISIG); + } + if (which_type == TxoutType::NONSTANDARD) { + assert(!is_standard_ret); + } if (which_type == TxoutType::NULL_DATA) { assert(script.IsUnspendable()); } |