Better size est.

This commit is contained in:
Neil Booth 2016-10-11 06:49:50 +09:00
parent 22762fb9f5
commit 682cc8ff86

View File

@ -490,7 +490,7 @@ class DB(object):
'''Returns the approximate size of the cache, in MB.'''
utxo_MB = ((len(self.utxo_cache.cache) + len(self.utxo_cache.db_cache))
* 100 // 1048576)
hist_MB = (len(self.history) * 48 + self.history_size * 4) // 1048576
hist_MB = (len(self.history) * 48 + self.history_size * 20) // 1048576
if self.height % 200 == 0:
self.logger.info('cache size at height {:,d}: '
'UTXOs: {:,d} MB history: {:,d} MB'