]> Git Repo - VerusCoin.git/blob - src/script/sigcache.h
Merge branch 'dev' of github.com:miketout/VerusCoin into dev
[VerusCoin.git] / src / script / sigcache.h
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2014 The Bitcoin Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or https://www.opensource.org/licenses/mit-license.php .
5
6 #ifndef BITCOIN_SCRIPT_SIGCACHE_H
7 #define BITCOIN_SCRIPT_SIGCACHE_H
8
9 #include "script/interpreter.h"
10
11 #include <vector>
12
13 // DoS prevention: limit cache size to less than 40MB (over 500000
14 // entries on 64-bit systems).
15 static const unsigned int DEFAULT_MAX_SIG_CACHE_SIZE = 40;
16
17 class CPubKey;
18
19 class CachingTransactionSignatureChecker : public TransactionSignatureChecker
20 {
21 private:
22     bool store;
23
24 public:
25     CachingTransactionSignatureChecker(const CTransaction* txToIn, unsigned int nInIn, const CAmount& amount, bool storeIn, PrecomputedTransactionData& txdataIn) : TransactionSignatureChecker(txToIn, nInIn, amount, txdataIn), store(storeIn) {}
26
27     bool VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& vchPubKey, const uint256& sighash) const;
28 };
29
30 #endif // BITCOIN_SCRIPT_SIGCACHE_H
This page took 0.025437 seconds and 4 git commands to generate.