Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov committed May 26, 2024
1 parent b9f82a5 commit 1413c30
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions erigon-lib/state/history.go
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,15 @@ func (ht *HistoryRoTx) Prune(ctx context.Context, rwTx kv.RwTx, txFrom, txTo, li
return err
}
} else {
if asserts {
vv, err := valsCDup.SeekBothRange(k, txnm)
if err != nil {
return err
}
if binary.BigEndian.Uint64(vv) != txNum {
return fmt.Errorf("history invalid txNum: %d != %d", binary.BigEndian.Uint64(vv), txNum)
}
}
if err = valsCDup.DeleteExact(k, txnm); err != nil {
return err
}
Expand Down

0 comments on commit 1413c30

Please sign in to comment.