mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
coins: assert just-created-coin has no dynamic memory usage
This was added for the two branches to be symmetric and to explain why this branch is missing a subtraction. Co-authored-by: Andrew Toth <andrewstoth@gmail.com>
This commit is contained in:
parent
8d11c5b383
commit
ba38dad502
2 changed files with 1 additions and 1 deletions
|
@ -195,6 +195,7 @@ bool CCoinsViewCache::BatchWrite(CoinsViewCacheCursor& cursor, const uint256 &ha
|
|||
// and mark it as dirty.
|
||||
itUs = cacheCoins.try_emplace(it->first).first;
|
||||
CCoinsCacheEntry& entry{itUs->second};
|
||||
assert(entry.coin.DynamicMemoryUsage() == 0);
|
||||
if (cursor.WillErase(*it)) {
|
||||
// Since this entry will be erased,
|
||||
// we can move the coin into us instead of copying it
|
||||
|
|
|
@ -44,7 +44,6 @@ unsigned-integer-overflow:arith_uint256.h
|
|||
unsigned-integer-overflow:CBloomFilter::Hash
|
||||
unsigned-integer-overflow:CRollingBloomFilter::insert
|
||||
unsigned-integer-overflow:RollingBloomHash
|
||||
unsigned-integer-overflow:CCoinsViewCache::BatchWrite
|
||||
unsigned-integer-overflow:CompressAmount
|
||||
unsigned-integer-overflow:DecompressAmount
|
||||
unsigned-integer-overflow:crypto/
|
||||
|
|
Loading…
Add table
Reference in a new issue