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 1413c30 commit 89c3f88
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions erigon-lib/state/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -1952,11 +1952,8 @@ func (dt *DomainRoTx) Prune(ctx context.Context, rwTx kv.RwTx, step, txFrom, txT
return stat, fmt.Errorf("prune domain value: %w", err)
}

// This DeleteCurrent needs to the last in the loop iteration, because it invalidates k and v
if _, _, err = keysCursorForDeletes.SeekBothExact(k, v); err != nil {
return stat, err
}
if err = keysCursorForDeletes.DeleteCurrent(); err != nil {
// Delete needs to the last in the loop iteration, because it invalidates k and v
if err = keysCursorForDeletes.DeleteExact(k, v); err != nil {
return stat, err
}
stat.Values++
Expand Down

0 comments on commit 89c3f88

Please sign in to comment.