Update tests with cache usage computations

This commit is contained in:
Sean Bowe 2016-07-10 20:53:33 -06:00
parent 7f3c7a683b
commit ffcd1c57cc
1 changed files with 3 additions and 1 deletions

View File

@ -136,7 +136,9 @@ public:
void SelfTest() const
{
// Manually recompute the dynamic usage of the whole data, and compare it.
size_t ret = memusage::DynamicUsage(cacheCoins);
size_t ret = memusage::DynamicUsage(cacheCoins) +
memusage::DynamicUsage(cacheAnchors) +
memusage::DynamicUsage(cacheSerials);
for (CCoinsMap::iterator it = cacheCoins.begin(); it != cacheCoins.end(); it++) {
ret += memusage::DynamicUsage(it->second.coins);
}