mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 14:46:42 +00:00
triedb/pathdb: improve logging
This commit is contained in:
parent
91ea245c75
commit
4e4c50845a
2 changed files with 3 additions and 2 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue