Use accurate memory for flushing decisions

This commit is contained in:
Pieter Wuille
2015-05-04 01:38:08 +02:00
parent 046392dc1d
commit fc684ad8af
3 changed files with 5 additions and 5 deletions

View File

@@ -1067,7 +1067,7 @@ bool AppInit2(boost::thread_group& threadGroup)
nTotalCache -= nBlockTreeDBCache;
size_t nCoinDBCache = nTotalCache / 2; // use half of the remaining cache for coindb cache
nTotalCache -= nCoinDBCache;
nCoinCacheSize = nTotalCache / 300; // coins in memory require around 300 bytes
nCoinCacheUsage = nTotalCache;
bool fLoaded = false;
while (!fLoaded) {