mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-12 09:51:36 +00:00
triedb/pathdb: improve log
This commit is contained in:
parent
bcce50b037
commit
00acc891ca
1 changed files with 3 additions and 6 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue