| 212 | } |
| 213 | |
| 214 | bool SignSignature(const CKeyStore &keystore, const CScript& fromPubKey, CMutableTransaction& txTo, unsigned int nIn, const CAmount& amount, int nHashType) |
| 215 | { |
| 216 | assert(nIn < txTo.vin.size()); |
| 217 | |
| 218 | CTransaction txToConst(txTo); |
| 219 | TransactionSignatureCreator creator(&keystore, &txToConst, nIn, amount, nHashType); |
| 220 | |
| 221 | SignatureData sigdata; |
| 222 | bool ret = ProduceSignature(creator, fromPubKey, sigdata); |
| 223 | UpdateTransaction(txTo, nIn, sigdata); |
| 224 | return ret; |
| 225 | } |
| 226 | |
| 227 | bool SignSignature(const CKeyStore &keystore, const CTransaction& txFrom, CMutableTransaction& txTo, unsigned int nIn, int nHashType) |
| 228 | { |