From 00acc891caa496cd92a089811066e3ec66ff758e Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Fri, 13 Mar 2026 13:25:10 +0800 Subject: [PATCH] triedb/pathdb: improve log --- triedb/pathdb/history_index_pruner.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/triedb/pathdb/history_index_pruner.go b/triedb/pathdb/history_index_pruner.go index 165a6505b1..ee133dc323 100644 --- a/triedb/pathdb/history_index_pruner.go +++ b/triedb/pathdb/history_index_pruner.go @@ -148,23 +148,20 @@ func (p *indexPruner) process(tail uint64) error { } pruned += pn scanned += sn + statePruneHistoryIndexTimer.UpdateSince(start) case typeTrienodeHistory: pruned, scanned, err = p.prunePrefix(rawdb.TrienodeHistoryMetadataPrefix, typeTrienode, tail) if err != nil { return err } + trienodePruneHistoryIndexTimer.UpdateSince(start) default: panic("unknown history type") } if pruned > 0 { - p.log.Debug("Pruned stale index blocks", "pruned", pruned, "scanned", scanned, "tail", tail, "elapsed", common.PrettyDuration(time.Since(start))) - } - if p.typ == typeStateHistory { - statePruneHistoryIndexTimer.UpdateSince(start) - } else { - trienodePruneHistoryIndexTimer.UpdateSince(start) + p.log.Info("Pruned stale index blocks", "pruned", pruned, "scanned", scanned, "tail", tail, "elapsed", common.PrettyDuration(time.Since(start))) } return nil }