| 139 | } |
| 140 | |
| 141 | CMutableTransaction BuildSpendingTransaction(const CScript& scriptSig, const CScriptWitness& scriptWitness, const CTransaction& txCredit) |
| 142 | { |
| 143 | CMutableTransaction txSpend; |
| 144 | txSpend.nVersion = 1; |
| 145 | txSpend.nLockTime = 0; |
| 146 | txSpend.vin.resize(1); |
| 147 | txSpend.vout.resize(1); |
| 148 | txSpend.vin[0].scriptWitness = scriptWitness; |
| 149 | txSpend.vin[0].prevout.hash = txCredit.GetHash(); |
| 150 | txSpend.vin[0].prevout.n = 0; |
| 151 | txSpend.vin[0].scriptSig = scriptSig; |
| 152 | txSpend.vin[0].nSequence = CTxIn::SEQUENCE_FINAL; |
| 153 | txSpend.vout[0].scriptPubKey = CScript(); |
| 154 | txSpend.vout[0].nValue = txCredit.vout[0].nValue; |
| 155 | |
| 156 | return txSpend; |
| 157 | } |
| 158 | |
| 159 | void DoTest(const CScript& scriptPubKey, const CScript& scriptSig, const CScriptWitness& scriptWitness, int flags, const std::string& message, int scriptError, CAmount nValue = 0) |
| 160 | { |
no test coverage detected