diff --git a/src/coins.cpp b/src/coins.cpp index 30610b45711..9f8a685c81c 100644 --- a/src/coins.cpp +++ b/src/coins.cpp @@ -315,14 +315,14 @@ void CCoinsViewCache::SanityCheck() const if (entry.IsDirty()) attr |= 1; if (entry.IsFresh()) attr |= 2; if (entry.coin.IsSpent()) attr |= 4; - // Only 5 combinations are possible. - assert(attr != 2 && attr != 4 && attr != 7); + // Only 4 combinations are possible. + assert(attr != 2 && attr != 4 && attr != 6 && attr != 7); // Recompute cachedCoinsUsage. recomputed_usage += entry.coin.DynamicMemoryUsage(); // Count the number of entries we expect in the linked list. - if (entry.IsDirty() || entry.IsFresh()) ++count_flagged; + if (entry.IsDirty()) ++count_flagged; } // Iterate over the linked list of flagged entries. size_t count_linked = 0; @@ -331,7 +331,7 @@ void CCoinsViewCache::SanityCheck() const assert(it->second.Next()->second.Prev() == it); assert(it->second.Prev()->second.Next() == it); // Verify they are actually flagged. - assert(it->second.IsDirty() || it->second.IsFresh()); + assert(it->second.IsDirty()); // Count the number of entries actually in the list. ++count_linked; }