diff options
author | Carl Dong <contact@carldong.me> | 2022-06-30 23:47:41 -0400 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2022-08-03 12:03:27 -0400 |
commit | 41c5201a90bbc2893333e334e8945759ef24e7dd (patch) | |
tree | 3c8e26fa4b9769b7a2fa4fa75dd059c84d89fad8 /src/validation.h | |
parent | 82d3058539f54ebad745e2b02b61df01aa832a54 (diff) | |
download | bitcoin-41c5201a90bbc2893333e334e8945759ef24e7dd.tar.xz |
validationcaches: Add and use ValidationCacheSizes
Also:
- Make DEFAULT_MAX_SIG_CACHE_SIZE into constexpr
DEFAULT_MAX_SIG_CACHE_BYTES to utilize the compile-time integer
arithmetic overflow checking available to constexpr.
- Fix comment (MiB instead of MB) for DEFAULT_MAX_SIG_CACHE_BYTES.
- Pass in max_size_bytes parameter to InitS*Cache(), modify log line to
no longer allude to maxsigcachesize being split evenly between the two
validation caches.
- Fix possible integer truncation and add a comment.
[META] I've kept the integer types as int64_t in order to not introduce
unintended behaviour changes, in the next commit we will make
them size_t.
Diffstat (limited to 'src/validation.h')
-rw-r--r-- | src/validation.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/validation.h b/src/validation.h index 92ade4cf94..6e072a49d9 100644 --- a/src/validation.h +++ b/src/validation.h @@ -323,7 +323,7 @@ public: }; /** Initializes the script-execution cache */ -[[nodiscard]] bool InitScriptExecutionCache(); +[[nodiscard]] bool InitScriptExecutionCache(int64_t max_size_bytes); /** Functions for validating blocks and updating the block tree */ |