Changeset View
Changeset View
Standalone View
Standalone View
src/script/sign.cpp
Show First 20 Lines • Show All 195 Lines • ▼ Show 20 Lines | bool SignSignature(const CKeyStore &keystore, const CScript &fromPubKey, | ||||
return ret; | return ret; | ||||
} | } | ||||
bool SignSignature(const CKeyStore &keystore, const CTransaction &txFrom, | bool SignSignature(const CKeyStore &keystore, const CTransaction &txFrom, | ||||
CMutableTransaction &txTo, unsigned int nIn, | CMutableTransaction &txTo, unsigned int nIn, | ||||
SigHashType sigHashType) { | SigHashType sigHashType) { | ||||
assert(nIn < txTo.vin.size()); | assert(nIn < txTo.vin.size()); | ||||
CTxIn &txin = txTo.vin[nIn]; | CTxIn &txin = txTo.vin[nIn]; | ||||
assert(txin.prevout.n < txFrom.vout.size()); | assert(txin.prevout.GetN() < txFrom.vout.size()); | ||||
const CTxOut &txout = txFrom.vout[txin.prevout.n]; | const CTxOut &txout = txFrom.vout[txin.prevout.GetN()]; | ||||
return SignSignature(keystore, txout.scriptPubKey, txTo, nIn, txout.nValue, | return SignSignature(keystore, txout.scriptPubKey, txTo, nIn, txout.nValue, | ||||
sigHashType); | sigHashType); | ||||
} | } | ||||
static std::vector<valtype> CombineMultisig( | static std::vector<valtype> CombineMultisig( | ||||
const CScript &scriptPubKey, const BaseSignatureChecker &checker, | const CScript &scriptPubKey, const BaseSignatureChecker &checker, | ||||
const std::vector<valtype> &vSolutions, const std::vector<valtype> &sigs1, | const std::vector<valtype> &vSolutions, const std::vector<valtype> &sigs1, | ||||
▲ Show 20 Lines • Show All 176 Lines • Show Last 20 Lines |