|
|
@ -206,6 +206,15 @@ bool CCoinsViewCache::Flush() {
|
|
|
|
return fOk;
|
|
|
|
return fOk;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CCoinsViewCache::Uncache(const uint256& hash)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
CCoinsMap::iterator it = cacheCoins.find(hash);
|
|
|
|
|
|
|
|
if (it != cacheCoins.end() && it->second.flags == 0) {
|
|
|
|
|
|
|
|
cachedCoinsUsage -= it->second.coins.DynamicMemoryUsage();
|
|
|
|
|
|
|
|
cacheCoins.erase(it);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
unsigned int CCoinsViewCache::GetCacheSize() const {
|
|
|
|
unsigned int CCoinsViewCache::GetCacheSize() const {
|
|
|
|
return cacheCoins.size();
|
|
|
|
return cacheCoins.size();
|
|
|
|
}
|
|
|
|
}
|
|
|
|