mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-17 04:11:37 +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
|
pruned += pn
|
||||||
scanned += sn
|
scanned += sn
|
||||||
|
statePruneHistoryIndexTimer.UpdateSince(start)
|
||||||
|
|
||||||
case typeTrienodeHistory:
|
case typeTrienodeHistory:
|
||||||
pruned, scanned, err = p.prunePrefix(rawdb.TrienodeHistoryMetadataPrefix, typeTrienode, tail)
|
pruned, scanned, err = p.prunePrefix(rawdb.TrienodeHistoryMetadataPrefix, typeTrienode, tail)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
trienodePruneHistoryIndexTimer.UpdateSince(start)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
panic("unknown history type")
|
panic("unknown history type")
|
||||||
}
|
}
|
||||||
if pruned > 0 {
|
if pruned > 0 {
|
||||||
p.log.Debug("Pruned stale index blocks", "pruned", pruned, "scanned", scanned, "tail", tail, "elapsed", common.PrettyDuration(time.Since(start)))
|
p.log.Info("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)
|
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue