mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-08 22:57:56 +02:00
refactor: rename will_reuse_cache to reallocate_cache
More accurately reflects the purpose of the parameter, since we will keep reusing the cache but don't want to reallocate it.
This commit is contained in:
@@ -254,12 +254,12 @@ void CCoinsViewCache::BatchWrite(CoinsViewCacheCursor& cursor, const uint256& ha
|
||||
SetBestBlock(hashBlockIn);
|
||||
}
|
||||
|
||||
void CCoinsViewCache::Flush(bool will_reuse_cache)
|
||||
void CCoinsViewCache::Flush(bool reallocate_cache)
|
||||
{
|
||||
auto cursor{CoinsViewCacheCursor(m_sentinel, cacheCoins, /*will_erase=*/true)};
|
||||
base->BatchWrite(cursor, hashBlock);
|
||||
cacheCoins.clear();
|
||||
if (will_reuse_cache) {
|
||||
if (reallocate_cache) {
|
||||
ReallocateCache();
|
||||
}
|
||||
cachedCoinsUsage = 0;
|
||||
|
||||
Reference in New Issue
Block a user