aboutsummaryrefslogtreecommitdiffstats
path: root/core/state
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-10-19 22:17:42 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-10-19 22:31:19 +0800
commit88a593d559d26a91b64178094728fd9ca7c25a2c (patch)
tree6ae827ef8a6b62c0fc9e14c8e72a44b47fba5c82 /core/state
parent5d9bb0a050df0e58ed1073ef92f45676380ac26e (diff)
downloaddexon-88a593d559d26a91b64178094728fd9ca7c25a2c.tar
dexon-88a593d559d26a91b64178094728fd9ca7c25a2c.tar.gz
dexon-88a593d559d26a91b64178094728fd9ca7c25a2c.tar.bz2
dexon-88a593d559d26a91b64178094728fd9ca7c25a2c.tar.lz
dexon-88a593d559d26a91b64178094728fd9ca7c25a2c.tar.xz
dexon-88a593d559d26a91b64178094728fd9ca7c25a2c.tar.zst
dexon-88a593d559d26a91b64178094728fd9ca7c25a2c.zip
cmd/geth, trie: report on trie cache unloads, also add debug log
Diffstat (limited to 'core/state')
-rw-r--r--core/state/statedb.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/state/statedb.go b/core/state/statedb.go
index 6a24d2865..ae106e03b 100644
--- a/core/state/statedb.go
+++ b/core/state/statedb.go
@@ -564,6 +564,8 @@ func (s *StateDB) Commit() (root common.Hash, err error) {
func (s *StateDB) CommitBatch() (root common.Hash, batch ethdb.Batch) {
batch = s.db.NewBatch()
root, _ = s.commit(batch)
+
+ glog.V(logger.Debug).Infof("Trie cache stats: %d misses, %d unloads", trie.CacheMisses(), trie.CacheUnloads())
return root, batch
}