mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
reset meta if found
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
7d9e189c66
commit
fe1772f3c5
1 changed files with 4 additions and 4 deletions
|
|
@ -337,13 +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)
|
||||||
oldID := uint64(0)
|
// 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
|
oldID := meta.Last
|
||||||
}
|
|
||||||
log.Warn("Reset state history index metadata after truncation", "oldID", oldID, "newID", id)
|
log.Warn("Reset state history index metadata after truncation", "oldID", oldID, "newID", id)
|
||||||
storeIndexMetadata(db.diskdb, id)
|
storeIndexMetadata(db.diskdb, id)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue