aboutsummaryrefslogtreecommitdiff
path: root/src/script/sigcache.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2014-09-14 04:48:32 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2014-10-02 20:26:58 +0200
commite790c370b5971dd096d1bbfd55960ccf71b7594a (patch)
treede37518b3fa3c9fe6d3c6b70759f05dde90134fb /src/script/sigcache.h
parent5c1e798a8e9df15f8fbd120e57fc67e585f13843 (diff)
Replace SCRIPT_VERIFY_NOCACHE by flag directly to checker
Diffstat (limited to 'src/script/sigcache.h')
-rw-r--r--src/script/sigcache.h18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/script/sigcache.h b/src/script/sigcache.h
index 8faa7ae01f..9537efbd11 100644
--- a/src/script/sigcache.h
+++ b/src/script/sigcache.h
@@ -14,21 +14,13 @@ class CPubKey;
class CachingSignatureChecker : public SignatureChecker
{
+private:
+ bool store;
+
public:
- CachingSignatureChecker(const CTransaction& txToIn, unsigned int nInIn) : SignatureChecker(txToIn, nInIn) {}
+ CachingSignatureChecker(const CTransaction& txToIn, unsigned int nInIn, bool storeIn=true) : SignatureChecker(txToIn, nInIn), store(storeIn) {}
- bool VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& vchPubKey, const uint256& sighash, int flags) const;
+ bool VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& vchPubKey, const uint256& sighash) const;
};
-// Wrappers using a default SignatureChecker.
-bool inline EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, unsigned int flags)
-{
- return EvalScript(stack, script, flags, CachingSignatureChecker(txTo, nIn));
-}
-
-bool inline VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, unsigned int flags)
-{
- return VerifyScript(scriptSig, scriptPubKey, flags, CachingSignatureChecker(txTo, nIn));
-}
-
#endif