mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
cuckoocache: Return approximate memory size
Returning the approximate total size eliminates the need for InitS*Cache() to do nElems*sizeof(uint256). The cuckoocache has a better idea of this information.
This commit is contained in:
parent
0dbce4b103
commit
08dbc6ef72
8 changed files with 33 additions and 20 deletions
|
|
@ -1115,8 +1115,9 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
|||
args.GetArg("-datadir", ""), fs::PathToString(fs::current_path()));
|
||||
}
|
||||
|
||||
InitSignatureCache();
|
||||
InitScriptExecutionCache();
|
||||
if (!InitSignatureCache() || !InitScriptExecutionCache()) {
|
||||
return InitError(strprintf(_("Unable to allocate memory for -maxsigcachesize: '%s' MiB"), args.GetIntArg("-maxsigcachesize", DEFAULT_MAX_SIG_CACHE_SIZE)));
|
||||
}
|
||||
|
||||
int script_threads = args.GetIntArg("-par", DEFAULT_SCRIPTCHECK_THREADS);
|
||||
if (script_threads <= 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue