triedb/pathdb: improve logging

This commit is contained in:
Gary Rong 2025-05-15 20:29:34 +08:00
parent 91ea245c75
commit 4e4c50845a
2 changed files with 3 additions and 2 deletions

View file

@ -366,11 +366,12 @@ func (dl *diskLayer) commit(bottom *diffLayer, force bool) (*diskLayer, error) {
if dl.generator != nil { if dl.generator != nil {
dl.generator.stop() dl.generator.stop()
progress = dl.generator.progressMarker() progress = dl.generator.progressMarker()
log.Info("Terminated snapshot generation")
// If the snapshot has been fully generated, unset the generator // If the snapshot has been fully generated, unset the generator
if progress == nil { if progress == nil {
dl.setGenerator(nil) dl.setGenerator(nil)
} else {
log.Info("Paused snapshot generation")
} }
} }
// Flush the content in combined buffer. Any state data after the progress // Flush the content in combined buffer. Any state data after the progress

View file

@ -131,7 +131,7 @@ func (g *generator) run(root common.Hash) {
} }
if g.running { if g.running {
g.stop() g.stop()
log.Warn("Terminated the leftover generation cycle") log.Warn("Paused the leftover generation cycle")
} }
g.running = true g.running = true
go g.generate(newGeneratorContext(root, g.progress, g.db)) go g.generate(newGeneratorContext(root, g.progress, g.db))