diff --git a/src/test/fuzz/script.cpp b/src/test/fuzz/script.cpp index 8a6c5added219..740b1f9969e99 100644 --- a/src/test/fuzz/script.cpp +++ b/src/test/fuzz/script.cpp @@ -69,6 +69,13 @@ FUZZ_TARGET_INIT(script, initialize_script) TxoutType which_type; (void)IsStandard(script, which_type); + if (which_type == TxoutType::NULL_DATA) { + assert(script.IsUnspendable()); + } + if (script.IsUnspendable()) { + assert(which_type == TxoutType::NULL_DATA || + which_type == TxoutType::NONSTANDARD); + } (void)RecursiveDynamicUsage(script); @@ -77,7 +84,6 @@ FUZZ_TARGET_INIT(script, initialize_script) (void)script.IsPayToScriptHash(); (void)script.IsPushOnly(); - (void)script.IsUnspendable(); (void)script.GetSigOpCount(/* fAccurate= */ false); (void)FormatScript(script);