mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 21:26:42 +00:00
triedb/pathdb: add log
This commit is contained in:
parent
61d04282c7
commit
bbebe46b41
1 changed files with 2 additions and 1 deletions
|
|
@ -374,7 +374,8 @@ func (dl *diskLayer) writeStateHistory(diff *diffLayer) (bool, error) {
|
|||
//
|
||||
// These measures ensure the persisted state ID always remains greater
|
||||
// than or equal to the first history ID.
|
||||
if rawdb.ReadPersistentStateID(dl.db.diskdb) < newFirst {
|
||||
if persistentID := rawdb.ReadPersistentStateID(dl.db.diskdb); persistentID < newFirst {
|
||||
log.Debug("Skip tail truncation", "persistentID", persistentID, "tailID", tail+1, "headID", diff.stateID(), "limit", limit)
|
||||
return true, nil
|
||||
}
|
||||
pruned, err := truncateFromTail(dl.db.diskdb, dl.db.stateFreezer, newFirst-1)
|
||||
|
|
|
|||
Loading…
Reference in a new issue