From c92a53d2bff9a2ed11f04a28a038c190b7259322 Mon Sep 17 00:00:00 2001 From: fudongbai <296179868@qq.com> Date: Thu, 29 Apr 2021 13:24:22 +0800 Subject: [PATCH] add more logs --- core/state/snapshot/snapshot.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/state/snapshot/snapshot.go b/core/state/snapshot/snapshot.go index eccf37726..95e2c7647 100644 --- a/core/state/snapshot/snapshot.go +++ b/core/state/snapshot/snapshot.go @@ -204,6 +204,7 @@ func New(diskdb ethdb.KeyValueStore, triedb *trie.Database, cache int, root comm snap.layers[head.Root()] = head head = head.Parent() } + log.Info("Snapshot loaded", "diskRoot", snap.diskRoot(), "root", root) return snap, nil } @@ -294,6 +295,7 @@ func (t *Tree) Update(blockRoot common.Hash, parentRoot common.Hash, destructs m defer t.lock.Unlock() t.layers[snap.root] = snap + log.Info("Snapshot updated", "blockRoot", blockRoot) return nil } @@ -376,6 +378,7 @@ func (t *Tree) Cap(root common.Hash, layers int) error { } rebloom(persisted.root) } + log.Info("Snapshot capped", "root", root) return nil }