triedb/pathdb: log the expected version in obsolete-index cleanup

The "Cleaned up obsolete history index" log passed "version" and "want"
the same value, so the "want" field just repeated the found version and
never showed what version was expected. Log the expected version (ver)
under "want" so the message conveys found-vs-expected as intended.
This commit is contained in:
ozpool 2026-06-19 12:42:50 +05:30
parent 7c9032dff6
commit e3783e242a
No known key found for this signature in database

View file

@ -766,7 +766,7 @@ func checkVersion(disk ethdb.KeyValueStore, typ historyType) {
if err == nil {
version = fmt.Sprintf("%d", m.Version)
}
log.Info("Cleaned up obsolete history index", "type", typ, "version", version, "want", version)
log.Info("Cleaned up obsolete history index", "type", typ, "version", version, "want", fmt.Sprintf("%d", ver))
}
// newHistoryIndexer constructs the history indexer and launches the background