From f36aaa6392fdbdac6891d92202d3efeff98754f4 Mon Sep 17 00:00:00 2001 From: James O'Beirne Date: Mon, 16 Sep 2019 15:01:12 -0400 Subject: Add CChainState::ResizeCoinsCaches Also adds CCoinsViewCache::ReallocateCache() to attempt to free memory that the cacheCoins's allocator may be hanging onto when downsizing the cache. Adds `CChainState::m_coins{tip,db}_cache_size_bytes` data members so that we can reference cache size on a per-chainstate basis for flushing. --- src/test/util/setup_common.cpp | 2 +- src/test/validation_chainstatemanager_tests.cpp | 11 +++++------ src/test/validation_flush_tests.cpp | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) (limited to 'src/test') diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp index 3b7a7c8d12..83916fd080 100644 --- a/src/test/util/setup_common.cpp +++ b/src/test/util/setup_common.cpp @@ -139,7 +139,7 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::vector