diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp index 7008e4b0a2..7fe9376300 100644 --- a/src/test/script_tests.cpp +++ b/src/test/script_tests.cpp @@ -157,9 +157,8 @@ void DoTest(const CScript& scriptPubKey, const CScript& scriptSig, int flags, co int extra_flags = InsecureRandBits(16); int combined_flags = expect ? (flags & ~extra_flags) : (flags | extra_flags); // Weed out some invalid flag combinations. - if (combined_flags & SCRIPT_VERIFY_CLEANSTACK && ~combined_flags & (SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS)) continue; - if (combined_flags & SCRIPT_VERIFY_WITNESS && ~combined_flags & SCRIPT_VERIFY_P2SH) continue; - BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, &scriptWitness, combined_flags, MutableTransactionSignatureChecker(&tx, 0, txCredit.vout[0].nValue), &err) == expect, message + strprintf(" (with flags %x)", combined_flags)); + if (combined_flags & SCRIPT_VERIFY_CLEANSTACK && ~combined_flags & SCRIPT_VERIFY_P2SH) continue; + BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, combined_flags, MutableTransactionSignatureChecker(&tx, 0, txCredit.vout[0].nValue), &err) == expect, message + strprintf(" (with flags %x)", combined_flags)); } #if defined(HAVE_CONSENSUS_LIB)