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
|
|
@ -1156,11 +1156,8 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
|||
|
||||
ValidationCacheSizes validation_cache_sizes{};
|
||||
ApplyArgsManOptions(args, validation_cache_sizes);
|
||||
if (!InitSignatureCache(validation_cache_sizes.signature_cache_bytes)
|
||||
|| !InitScriptExecutionCache(validation_cache_sizes.script_execution_cache_bytes))
|
||||
{
|
||||
return InitError(strprintf(_("Unable to allocate memory for -maxsigcachesize: '%s' MiB"), args.GetIntArg("-maxsigcachesize", DEFAULT_MAX_SIG_CACHE_BYTES >> 20)));
|
||||
}
|
||||
(void)InitSignatureCache(validation_cache_sizes.signature_cache_bytes);
|
||||
(void)InitScriptExecutionCache(validation_cache_sizes.script_execution_cache_bytes);
|
||||
|
||||
assert(!node.scheduler);
|
||||
node.scheduler = std::make_unique<CScheduler>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue