diff options
| author | Jeremy Rubin <[email protected]> | 2016-10-05 16:58:47 -0400 |
|---|---|---|
| committer | Jeremy Rubin <[email protected]> | 2016-12-14 16:02:05 -0500 |
| commit | c9e69fbf3915fe1187b4c2e77be5ae6b16121194 (patch) | |
| tree | 44f74b2355ce7c2618be7c2ba60c4fecbbfd4776 /src/script/sigcache.h | |
| parent | RPC: importmulti: Avoid using boost::variant::operator!=, which is only in ne... (diff) | |
| download | discoin-c9e69fbf3915fe1187b4c2e77be5ae6b16121194.tar.xz discoin-c9e69fbf3915fe1187b4c2e77be5ae6b16121194.zip | |
Add CuckooCache implementation and replace the sigcache map_type with it
SQUASHME: Change cuckoocache to only work for powers of two, to avoid mod operator
SQUASHME: Update Documentation and simplify logarithm logic
SQUASHME: OSX Build Errors
SQUASHME: minor Feedback from sipa + bluematt
SQUASHME: DOCONLY: Clarify a few comments.
Diffstat (limited to 'src/script/sigcache.h')
| -rw-r--r-- | src/script/sigcache.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/script/sigcache.h b/src/script/sigcache.h index 44551ec2b..5243fc0a4 100644 --- a/src/script/sigcache.h +++ b/src/script/sigcache.h @@ -10,9 +10,10 @@ #include <vector> -// DoS prevention: limit cache size to less than 40MB (over 500000 -// entries on 64-bit systems). -static const unsigned int DEFAULT_MAX_SIG_CACHE_SIZE = 40; +// DoS prevention: limit cache size to 32MB (over 1000000 entries on 64-bit +// systems). Due to how we count cache size, actual memory usage is slightly +// more (~32.25 MB) +static const unsigned int DEFAULT_MAX_SIG_CACHE_SIZE = 32; class CPubKey; @@ -27,4 +28,6 @@ public: bool VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& vchPubKey, const uint256& sighash) const; }; +void InitSignatureCache(); + #endif // BITCOIN_SCRIPT_SIGCACHE_H |