| 202 | } |
| 203 | |
| 204 | void UpdateTransaction(CMutableTransaction& tx, unsigned int nIn, const SignatureData& data) |
| 205 | { |
| 206 | assert(tx.vin.size() > nIn); |
| 207 | tx.vin[nIn].scriptSig = data.scriptSig; |
| 208 | if (!data.scriptWitness.IsNull() || tx.wit.vtxinwit.size() > nIn) { |
| 209 | tx.wit.vtxinwit.resize(tx.vin.size()); |
| 210 | tx.wit.vtxinwit[nIn].scriptWitness = data.scriptWitness; |
| 211 | } |
| 212 | } |
| 213 | |
| 214 | bool SignSignature(const CKeyStore &keystore, const CScript& fromPubKey, CMutableTransaction& txTo, unsigned int nIn, const CAmount& amount, int nHashType) |
| 215 | { |