aboutsummaryrefslogtreecommitdiff
path: root/src/script/sigcache.h
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2016-12-14 17:48:56 -0800
committerPieter Wuille <[email protected]>2016-12-14 18:14:02 -0800
commitb83264d9c7a8ddb79f64bd9540caddc8632ef31f (patch)
tree75628523862f0d8a75c7cdf5259fdeb41d5cfa42 /src/script/sigcache.h
parentMerge #9273: Remove unused CDiskBlockPos* argument from ProcessNewBlock (diff)
parentAdd unit tests for the CuckooCache (diff)
downloaddiscoin-b83264d9c7a8ddb79f64bd9540caddc8632ef31f.tar.xz
discoin-b83264d9c7a8ddb79f64bd9540caddc8632ef31f.zip
Merge #8895: Better SigCache Implementation
67dac4e Add unit tests for the CuckooCache (Jeremy Rubin) c9e69fb Add CuckooCache implementation and replace the sigcache map_type with it (Jeremy Rubin)
Diffstat (limited to 'src/script/sigcache.h')
-rw-r--r--src/script/sigcache.h9
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