| 328 | } |
| 329 | |
| 330 | void CCoinsViewCache::Uncache(const COutPoint& point) |
| 331 | { |
| 332 | CCoinsMap::iterator it = cacheCoins.find(native_key(point)); |
| 333 | if (it != cacheCoins.end() && it->second.flags == 0) { |
| 334 | cachedCoinsUsage -= it->second.coin.DynamicMemoryUsage(); |
| 335 | TRACE5(utxocache, uncache, |
| 336 | it->first.second.hash.data(), |
| 337 | it->first.second.n, |
| 338 | (uint32_t)it->second.coin.nHeight, |
| 339 | it->second.coin.out.nValue.IsExplicit() ? (int64_t)it->second.coin.out.nValue.GetAmount() : 0, |
| 340 | (bool)it->second.coin.IsCoinBase()); |
| 341 | cacheCoins.erase(it); |
| 342 | } |
| 343 | } |
| 344 | |
| 345 | unsigned int CCoinsViewCache::GetCacheSize() const { |
| 346 | return cacheCoins.size(); |