@@ -122,7 +122,6 @@ BOOST_FIXTURE_TEST_SUITE(script_tests, BasicTestingSetup)
122122void DoTest(const CScript& scriptPubKey, const CScript& scriptSig, uint32_t flags, const std::string& message, int scriptError)
123123{
124124 bool expect = (scriptError == SCRIPT_ERR_OK);
125- bool fEnableDIP0020Opcodes = (SCRIPT_ENABLE_DIP0020_OPCODES & flags) != 0 ;
126125 ScriptError err;
127126 const CTransaction txCredit{BuildCreditingTransaction (scriptPubKey)};
128127 CMutableTransaction tx = BuildSpendingTransaction (scriptSig, txCredit);
@@ -136,8 +135,6 @@ void DoTest(const CScript& scriptPubKey, const CScript& scriptSig, uint32_t flag
136135 uint32_t combined_flags{expect ? (flags & ~extra_flags) : (flags | extra_flags)};
137136 // Weed out some invalid flag combinations.
138137 if (combined_flags & SCRIPT_VERIFY_CLEANSTACK && ~combined_flags & SCRIPT_VERIFY_P2SH) continue ;
139- // Make sure DIP0020 opcodes flag stays unchanged.
140- combined_flags = fEnableDIP0020Opcodes ? (combined_flags | SCRIPT_ENABLE_DIP0020_OPCODES) : (combined_flags & ~SCRIPT_ENABLE_DIP0020_OPCODES);
141138 BOOST_CHECK_MESSAGE (VerifyScript (scriptSig, scriptPubKey, combined_flags, MutableTransactionSignatureChecker (&tx, 0 , txCredit.vout [0 ].nValue ), &err) == expect, message + strprintf (" (with flags %x)" , combined_flags));
142139 }
143140
@@ -680,8 +677,7 @@ BOOST_AUTO_TEST_CASE(script_build)
680677
681678 // Test OP_CHECKDATASIG
682679 const uint32_t checkdatasigflags = SCRIPT_VERIFY_STRICTENC |
683- SCRIPT_VERIFY_NULLFAIL |
684- SCRIPT_ENABLE_DIP0020_OPCODES;
680+ SCRIPT_VERIFY_NULLFAIL;
685681
686682 tests.push_back (
687683 TestBuilder (CScript () << ToByteVector (keys.pubkey1C ) << OP_CHECKDATASIG,
@@ -749,7 +745,7 @@ BOOST_AUTO_TEST_CASE(script_build)
749745 TestBuilder (CScript () << ToByteVector (keys.pubkey0H ) << OP_CHECKDATASIG
750746 << OP_NOT,
751747 " CHECKDATASIG with invalid hybrid pubkey but no STRICTENC" ,
752- SCRIPT_ENABLE_DIP0020_OPCODES )
748+ 0 )
753749 .PushDataSig (keys.key0 , {})
754750 .DamagePush (10 )
755751 .Num (0 ));
@@ -839,7 +835,7 @@ BOOST_AUTO_TEST_CASE(script_build)
839835 CScript () << ToByteVector (keys.pubkey0H ) << OP_CHECKDATASIGVERIFY
840836 << OP_TRUE,
841837 " CHECKDATASIGVERIFY with invalid hybrid pubkey but no STRICTENC" ,
842- SCRIPT_ENABLE_DIP0020_OPCODES )
838+ 0 )
843839 .PushDataSig (keys.key0 , {})
844840 .DamagePush (10 )
845841 .Num (0 )
0 commit comments