| 27 | } |
| 28 | |
| 29 | static bool |
| 30 | Verify(const CScript& scriptSig, const CScript& scriptPubKey, bool fStrict, ScriptError& err) |
| 31 | { |
| 32 | // Create dummy to/from transactions: |
| 33 | CMutableTransaction txFrom; |
| 34 | txFrom.vout.resize(1); |
| 35 | txFrom.vout[0].scriptPubKey = scriptPubKey; |
| 36 | |
| 37 | CMutableTransaction txTo; |
| 38 | txTo.vin.resize(1); |
| 39 | txTo.vout.resize(1); |
| 40 | txTo.vin[0].prevout.n = 0; |
| 41 | txTo.vin[0].prevout.hash = txFrom.GetHash(); |
| 42 | txTo.vin[0].scriptSig = scriptSig; |
| 43 | txTo.vout[0].nValue = 1; |
| 44 | |
| 45 | return VerifyScript(scriptSig, scriptPubKey, nullptr, fStrict ? SCRIPT_VERIFY_P2SH : SCRIPT_VERIFY_NONE, MutableTransactionSignatureChecker(&txTo, 0, txFrom.vout[0].nValue), &err); |
| 46 | } |
| 47 | |
| 48 | |
| 49 | BOOST_FIXTURE_TEST_SUITE(script_p2sh_tests, BasicTestingSetup) |
no test coverage detected