mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 05:36:46 +00:00
fix
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
ca764d706f
commit
d5585fe579
1 changed files with 6 additions and 4 deletions
|
|
@ -337,11 +337,13 @@ func (db *Database) repairHistory() error {
|
||||||
}
|
}
|
||||||
if pruned != 0 {
|
if pruned != 0 {
|
||||||
log.Warn("Truncated extra state histories", "number", pruned)
|
log.Warn("Truncated extra state histories", "number", pruned)
|
||||||
// Reset the state history index metadata to current state id.
|
|
||||||
if meta := loadIndexMetadata(db.diskdb); meta != nil {
|
if meta := loadIndexMetadata(db.diskdb); meta != nil {
|
||||||
oldID := meta.Last
|
// Reset the state history index metadata to current state id
|
||||||
log.Warn("Reset state history index metadata after truncation", "oldID", oldID, "newID", id)
|
// if it's out of boundry.
|
||||||
storeIndexMetadata(db.diskdb, id)
|
if old := meta.Last; old > id {
|
||||||
|
log.Warn("Reset state history index metadata after truncation", "oldID", old, "newID", id)
|
||||||
|
storeIndexMetadata(db.diskdb, id)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue