Update tests with cache usage computations
This commit is contained in:
@@ -136,7 +136,9 @@ public:
|
|||||||
void SelfTest() const
|
void SelfTest() const
|
||||||
{
|
{
|
||||||
// Manually recompute the dynamic usage of the whole data, and compare it.
|
// 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++) {
|
for (CCoinsMap::iterator it = cacheCoins.begin(); it != cacheCoins.end(); it++) {
|
||||||
ret += memusage::DynamicUsage(it->second.coins);
|
ret += memusage::DynamicUsage(it->second.coins);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user