aboutsummaryrefslogtreecommitdiff
path: root/src/script/sigcache.h
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2017-02-15 14:19:16 -0500
committerWladimir J. van der Laan <laanwj@gmail.com>2017-02-17 09:04:37 +0100
commit55c403b8febe02555c52bac7028cd6b1f006fad1 (patch)
tree5c1a5795990b01c47e49a03d3854e2c3a100766c /src/script/sigcache.h
parent476cc47da084633ac17b9b3c9257fab425b3bbba (diff)
downloadbitcoin-55c403b8febe02555c52bac7028cd6b1f006fad1.tar.xz
Ensure `-maxsigcachesize` is in valid range
- If the -maxsigcachesize parameter is set to zero, setup a minimum sized sigcache (2 elements) rather than segfaulting. - Handle maxsigcachesize being negative - Handle maxsigcachesize being too large
Diffstat (limited to 'src/script/sigcache.h')
-rw-r--r--src/script/sigcache.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/script/sigcache.h b/src/script/sigcache.h
index c123a9ba0f..238952bb95 100644
--- a/src/script/sigcache.h
+++ b/src/script/sigcache.h
@@ -14,6 +14,8 @@
// 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;
+// Maximum sig cache size allowed
+static const int64_t MAX_MAX_SIG_CACHE_SIZE = 16384;
class CPubKey;