From 4e4c50845ae34c2435ce113f3f28ffc737080e90 Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Thu, 15 May 2025 20:29:34 +0800 Subject: [PATCH] triedb/pathdb: improve logging --- triedb/pathdb/disklayer.go | 3 ++- triedb/pathdb/generate.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/triedb/pathdb/disklayer.go b/triedb/pathdb/disklayer.go index 6d174c4417..bee4cd1e8a 100644 --- a/triedb/pathdb/disklayer.go +++ b/triedb/pathdb/disklayer.go @@ -366,11 +366,12 @@ func (dl *diskLayer) commit(bottom *diffLayer, force bool) (*diskLayer, error) { if dl.generator != nil { dl.generator.stop() progress = dl.generator.progressMarker() - log.Info("Terminated snapshot generation") // If the snapshot has been fully generated, unset the generator if progress == nil { dl.setGenerator(nil) + } else { + log.Info("Paused snapshot generation") } } // Flush the content in combined buffer. Any state data after the progress diff --git a/triedb/pathdb/generate.go b/triedb/pathdb/generate.go index 414895cbf4..f4f98c9d19 100644 --- a/triedb/pathdb/generate.go +++ b/triedb/pathdb/generate.go @@ -131,7 +131,7 @@ func (g *generator) run(root common.Hash) { } if g.running { g.stop() - log.Warn("Terminated the leftover generation cycle") + log.Warn("Paused the leftover generation cycle") } g.running = true go g.generate(newGeneratorContext(root, g.progress, g.db))