28 if (std::optional<int64_t> db_cache =
args.
GetIntArg(
"-dbcache")) {
29 if (*db_cache < 0) db_cache = 0;
30 uint64_t db_cache_bytes = SaturatingLeftShift<uint64_t>(*db_cache, 20);
31 total_cache = std::max<size_t>(
MIN_DB_CACHE, std::min<uint64_t>(db_cache_bytes, std::numeric_limits<size_t>::max()));
static constexpr size_t MAX_FILTER_INDEX_CACHE
Max memory allocated to all block filter index caches combined in bytes.
static constexpr size_t MAX_TX_INDEX_CACHE
Max memory allocated to tx index DB specific cache in bytes.
int64_t GetIntArg(const std::string &strArg, int64_t nDefault) const
Return integer argument or default value.
bool GetBoolArg(const std::string &strArg, bool fDefault) const
Return boolean argument or default value.
CacheSizes CalculateCacheSizes(const ArgsManager &args, size_t n_indexes)
static constexpr size_t MIN_DB_CACHE
min. -dbcache (bytes)
static constexpr size_t DEFAULT_DB_CACHE
-dbcache default (bytes)
static constexpr bool DEFAULT_TXINDEX