mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
kernel: De-globalize signature cache
Move its ownership to the ChainstateManager class. Next to simplifying usage of the kernel library by no longer requiring manual setup of the cache prior to using validation code, it also slims down the amount of memory allocated by BasicTestingSetup. Use this opportunity to make SignatureCache RAII styled Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
This commit is contained in:
parent
66d74bfc45
commit
606a7ab862
17 changed files with 54 additions and 153 deletions
|
|
@ -63,6 +63,7 @@ util::Result<void> ApplyArgsManOptions(const ArgsManager& args, ChainstateManage
|
|||
// 2. Multiply first, divide after to avoid integer truncation.
|
||||
size_t clamped_size_each = std::max<int64_t>(*max_size, 0) * (1 << 20) / 2;
|
||||
opts.script_execution_cache_bytes = clamped_size_each;
|
||||
opts.signature_cache_bytes = clamped_size_each;
|
||||
}
|
||||
|
||||
return {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue