mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-14 14:45:12 +01:00
kernel: De-globalize script execution 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.
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <arith_uint256.h>
|
||||
#include <dbwrapper.h>
|
||||
#include <script/sigcache.h>
|
||||
#include <txdb.h>
|
||||
#include <uint256.h>
|
||||
#include <util/time.h>
|
||||
@@ -48,6 +49,7 @@ struct ChainstateManagerOpts {
|
||||
ValidationSignals* signals{nullptr};
|
||||
//! Number of script check worker threads. Zero means no parallel verification.
|
||||
int worker_threads_num{0};
|
||||
size_t script_execution_cache_bytes{DEFAULT_SCRIPT_EXECUTION_CACHE_BYTES};
|
||||
};
|
||||
|
||||
} // namespace kernel
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
namespace kernel {
|
||||
struct ValidationCacheSizes {
|
||||
size_t signature_cache_bytes{DEFAULT_MAX_SIG_CACHE_BYTES / 2};
|
||||
size_t script_execution_cache_bytes{DEFAULT_MAX_SIG_CACHE_BYTES / 2};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user