add ChainstateManager::MaybeRebalanceCaches()

Aside from in unittests, this method is unused at the moment. It will be used
in upcoming commits that enable utxo snapshot activation.
This commit is contained in:
James O'Beirne
2019-09-16 13:37:29 -04:00
committed by James O'Beirne
parent f36aaa6392
commit 8ac3ef4699
4 changed files with 99 additions and 0 deletions

View File

@@ -1562,6 +1562,9 @@ bool AppInitMain(const util::Ref& context, NodeContext& node)
try {
LOCK(cs_main);
chainman.InitializeChainstate();
chainman.m_total_coinstip_cache = nCoinCacheUsage;
chainman.m_total_coinsdb_cache = nCoinDBCache;
UnloadBlockIndex();
// new CBlockTreeDB tries to delete the existing file, which