Dash Core  0.12.2.1
P2P Digital Currency
sigcache.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2015 The Bitcoin Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://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 
20 {
21 private:
22  bool store;
23 
24 public:
25  CachingTransactionSignatureChecker(const CTransaction* txToIn, unsigned int nInIn, bool storeIn=true) : TransactionSignatureChecker(txToIn, nInIn), 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
static const unsigned int DEFAULT_MAX_SIG_CACHE_SIZE
Definition: sigcache.h:15
CachingTransactionSignatureChecker(const CTransaction *txToIn, unsigned int nInIn, bool storeIn=true)
Definition: sigcache.h:25
Definition: pubkey.h:37
bool VerifySignature(const std::vector< unsigned char > &vchSig, const CPubKey &vchPubKey, const uint256 &sighash) const
Definition: sigcache.cpp:92