Rename to PrecomputedTransactionData

This commit is contained in:
Pieter Wuille
2016-08-26 18:38:20 +02:00
committed by Jack Grigg
parent 90285e7b81
commit 6514771a44
10 changed files with 41 additions and 41 deletions

View File

@@ -1076,14 +1076,14 @@ uint256 GetOutputsHash(const CTransaction& txTo) {
} // anon namespace
CachedHashes::CachedHashes(const CTransaction& txTo)
PrecomputedTransactionData::PrecomputedTransactionData(const CTransaction& txTo)
{
hashPrevouts = GetPrevoutHash(txTo);
hashSequence = GetSequenceHash(txTo);
hashOutputs = GetOutputsHash(txTo);
}
uint256 SignatureHash(const CScript& scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType, const CAmount& amount, SigVersion sigversion, const CachedHashes* cache)
uint256 SignatureHash(const CScript& scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType, const CAmount& amount, SigVersion sigversion, const PrecomputedTransactionData* cache)
{
if (nIn >= txTo.vin.size() && nIn != NOT_AN_INPUT) {
// nIn out of range
@@ -1174,7 +1174,7 @@ bool TransactionSignatureChecker::CheckSig(const vector<unsigned char>& vchSigIn
uint256 sighash;
try {
sighash = SignatureHash(scriptCode, *txTo, nIn, nHashType, amount, sigversion, this->cachedHashes);
sighash = SignatureHash(scriptCode, *txTo, nIn, nHashType, amount, sigversion, this->txdata);
} catch (logic_error ex) {
return false;
}