* Verifies script execution of the zeroth scriptPubKey of tx output and * zeroth scriptSig and witness of tx input. */
| 68 | * zeroth scriptSig and witness of tx input. |
| 69 | */ |
| 70 | static ScriptError VerifyWithFlag(const CTransaction& output, const CMutableTransaction& input, uint32_t flags) |
| 71 | { |
| 72 | ScriptError error; |
| 73 | CTransaction inputi(input); |
| 74 | BOOST_CHECK_EQUAL(input.witness.vtxinwit.size(), 1U); |
| 75 | bool ret = VerifyScript(inputi.vin[0].scriptSig, |
| 76 | output.vout[0].scriptPubKey, |
| 77 | &inputi.witness.vtxinwit[0].scriptWitness, |
| 78 | flags, |
| 79 | TransactionSignatureChecker(&inputi, 0, output.vout[0].nValue, MissingDataBehavior::ASSERT_FAIL), |
| 80 | &error); |
| 81 | |
| 82 | BOOST_CHECK((ret == true) == (error == SCRIPT_ERR_OK)); |
| 83 | |
| 84 | return error; |
| 85 | } |
| 86 | |
| 87 | /** |
| 88 | * Builds a creationTx from scriptPubKey and a spendingTx from scriptSig |
no test coverage detected