coins: reset cachedCoinsUsage in Flush() only after the map is cleared

Prevents the counter from dropping to 0 while cacheCoins still holds objects
This commit is contained in:
Lőrinc 2025-04-18 11:23:27 +02:00
parent 6210b70291
commit 79bd941da6

View file

@ -254,8 +254,8 @@ bool CCoinsViewCache::Flush() {
if (fOk) { if (fOk) {
cacheCoins.clear(); cacheCoins.clear();
ReallocateCache(); ReallocateCache();
cachedCoinsUsage = 0;
} }
cachedCoinsUsage = 0;
return fOk; return fOk;
} }