aboutsummaryrefslogtreecommitdiff
path: root/src/script/interpreter.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-08-26 18:38:20 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2016-08-26 18:44:10 +0200
commit35fe0393f216aa6020fc929272118eade5628636 (patch)
tree72290f9f9a02d627dd0212b72e90823b4e3adf5d /src/script/interpreter.h
parentab48c5e72156b34300db4a6521cb3c9969be3937 (diff)
Rename to PrecomputedTransactionData
Diffstat (limited to 'src/script/interpreter.h')
-rw-r--r--src/script/interpreter.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/script/interpreter.h b/src/script/interpreter.h
index b4da113eec..e5d7865cd3 100644
--- a/src/script/interpreter.h
+++ b/src/script/interpreter.h
@@ -98,11 +98,11 @@ enum
bool CheckSignatureEncoding(const std::vector<unsigned char> &vchSig, unsigned int flags, ScriptError* serror);
-struct CachedHashes
+struct PrecomputedTransactionData
{
uint256 hashPrevouts, hashSequence, hashOutputs;
- CachedHashes(const CTransaction& tx);
+ PrecomputedTransactionData(const CTransaction& tx);
};
enum SigVersion
@@ -111,7 +111,7 @@ enum SigVersion
SIGVERSION_WITNESS_V0 = 1,
};
-uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType, const CAmount& amount, SigVersion sigversion, const CachedHashes* cache = NULL);
+uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType, const CAmount& amount, SigVersion sigversion, const PrecomputedTransactionData* cache = NULL);
class BaseSignatureChecker
{
@@ -140,14 +140,14 @@ private:
const CTransaction* txTo;
unsigned int nIn;
const CAmount amount;
- const CachedHashes* cachedHashes;
+ const PrecomputedTransactionData* txdata;
protected:
virtual bool VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& vchPubKey, const uint256& sighash) const;
public:
- TransactionSignatureChecker(const CTransaction* txToIn, unsigned int nInIn, const CAmount& amountIn) : txTo(txToIn), nIn(nInIn), amount(amountIn), cachedHashes(NULL) {}
- TransactionSignatureChecker(const CTransaction* txToIn, unsigned int nInIn, const CAmount& amountIn, const CachedHashes& cachedHashesIn) : txTo(txToIn), nIn(nInIn), amount(amountIn), cachedHashes(&cachedHashesIn) {}
+ TransactionSignatureChecker(const CTransaction* txToIn, unsigned int nInIn, const CAmount& amountIn) : txTo(txToIn), nIn(nInIn), amount(amountIn), txdata(NULL) {}
+ TransactionSignatureChecker(const CTransaction* txToIn, unsigned int nInIn, const CAmount& amountIn, const PrecomputedTransactionData& txdataIn) : txTo(txToIn), nIn(nInIn), amount(amountIn), txdata(&txdataIn) {}
bool CheckSig(const std::vector<unsigned char>& scriptSig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode, SigVersion sigversion) const;
bool CheckLockTime(const CScriptNum& nLockTime) const;
bool CheckSequence(const CScriptNum& nSequence) const;