| 149 | } |
| 150 | |
| 151 | CMutableTransaction BuildSpendingTransaction(const CScript& scriptSig, const CScriptWitness& scriptWitness, const CMutableTransaction& txCredit) |
| 152 | { |
| 153 | CMutableTransaction txSpend; |
| 154 | txSpend.nVersion = 1; |
| 155 | txSpend.nLockTime = 0; |
| 156 | txSpend.vin.resize(1); |
| 157 | txSpend.vout.resize(1); |
| 158 | txSpend.wit.vtxinwit[0].scriptWitness = scriptWitness; |
| 159 | txSpend.vin[0].prevout.hash = txCredit.GetHash(); |
| 160 | txSpend.vin[0].prevout.n = 0; |
| 161 | txSpend.vin[0].scriptSig = scriptSig; |
| 162 | txSpend.vin[0].nSequence = CTxIn::SEQUENCE_FINAL; |
| 163 | txSpend.vout[0].scriptPubKey = CScript(); |
| 164 | txSpend.vout[0].nValue = txCredit.vout[0].nValue; |
| 165 | |
| 166 | return txSpend; |
| 167 | } |
| 168 | |
| 169 | void DoTest(const CScript& scriptPubKey, const CScript& scriptSig, const CScriptWitness& scriptWitness, int flags, const std::string& message, int scriptError, CAmount nValue = 0) |
| 170 | { |
no test coverage detected