add more logs

This commit is contained in:
fudongbai 2021-04-29 13:24:22 +08:00
parent 2ac3f4ca85
commit c92a53d2bf

@ -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
}