mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
validation: Don't error if maxsigcachesize exceeds uint32::max
Instead clamp it to uint32::max if it exceeds it. Co-authored-by: Anthony Towns <aj@erisian.com.au>
This commit is contained in:
parent
d2c8d161b4
commit
ab14d1d6a4
5 changed files with 11 additions and 24 deletions
|
|
@ -2100,10 +2100,7 @@ bool InitScriptExecutionCache(size_t max_size_bytes)
|
|||
g_scriptExecutionCacheHasher.Write(nonce.begin(), 32);
|
||||
g_scriptExecutionCacheHasher.Write(nonce.begin(), 32);
|
||||
|
||||
auto setup_results = g_scriptExecutionCache.setup_bytes(max_size_bytes);
|
||||
if (!setup_results) return false;
|
||||
|
||||
const auto [num_elems, approx_size_bytes] = *setup_results;
|
||||
const auto [num_elems, approx_size_bytes] = g_scriptExecutionCache.setup_bytes(max_size_bytes);
|
||||
LogPrintf("Using %zu MiB out of %zu MiB requested for script execution cache, able to store %zu elements\n",
|
||||
approx_size_bytes >> 20, max_size_bytes >> 20, num_elems);
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue