From 89c3f8863c85421276eaa3bbd88f89e204cd99f1 Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Sun, 26 May 2024 11:06:34 +0700 Subject: [PATCH] save --- erigon-lib/state/domain.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/erigon-lib/state/domain.go b/erigon-lib/state/domain.go index ada40acbb02..ec7ab7d760a 100644 --- a/erigon-lib/state/domain.go +++ b/erigon-lib/state/domain.go @@ -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++