mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-28 16:36:04 +01:00
init: Correct coins db cache size setting
The chainstate caches are currently re-balanced on startup even in the non-assumeutxo case, leading to the database being needlessly re-opened and its cache re-allocated. Similar to `InitCoinsCache` and `m_coinstip_cache_size_bytes` the `m_coinsdb_cache_size_bytes` should be set in `InitCoinsDB`. Together with only conservatively setting the cache values when a assumeutxo chainstate is present, this allows for skipping the cache re-balance during initialization in the normal non-assumeutxo case.
This commit is contained in:
@@ -1972,6 +1972,8 @@ void Chainstate::InitCoinsDB(
|
||||
.obfuscate = true,
|
||||
.options = m_chainman.m_options.coins_db},
|
||||
m_chainman.m_options.coins_view);
|
||||
|
||||
m_coinsdb_cache_size_bytes = cache_size_bytes;
|
||||
}
|
||||
|
||||
void Chainstate::InitCoinsCache(size_t cache_size_bytes)
|
||||
|
||||
Reference in New Issue
Block a user