mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-01 00:34:01 +02:00
kernel: Move default cache constants to caches
They are not related to the txdb, so a better place for them is the new kernel and node cache file. Re-use the default amount of kernel cache for the default node cache.
This commit is contained in:
@@ -19,9 +19,9 @@
|
||||
|
||||
#include <consensus/validation.h>
|
||||
#include <core_io.h>
|
||||
#include <kernel/caches.h>
|
||||
#include <logging.h>
|
||||
#include <node/blockstorage.h>
|
||||
#include <node/caches.h>
|
||||
#include <node/chainstate.h>
|
||||
#include <random.h>
|
||||
#include <script/sigcache.h>
|
||||
@@ -123,7 +123,7 @@ int main(int argc, char* argv[])
|
||||
util::SignalInterrupt interrupt;
|
||||
ChainstateManager chainman{interrupt, chainman_opts, blockman_opts};
|
||||
|
||||
kernel::CacheSizes cache_sizes{nDefaultDbCache << 20};
|
||||
kernel::CacheSizes cache_sizes{DEFAULT_KERNEL_CACHE << 20};
|
||||
node::ChainstateLoadOptions options;
|
||||
auto [status, error] = node::LoadChainstate(chainman, cache_sizes, options);
|
||||
if (status != node::ChainstateLoadStatus::SUCCESS) {
|
||||
|
||||
Reference in New Issue
Block a user