Skip to content
This repository has been archived by the owner on Sep 23, 2023. It is now read-only.

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov committed Jun 26, 2023
1 parent 8e09afe commit 6dbd238
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions state/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -1399,6 +1399,9 @@ func (d *Domain) prune(ctx context.Context, step, txFrom, txTo, limit uint64, lo
binary.BigEndian.PutUint64(stepBytes, ^step)

for k, v, err = keysCursor.First(); err == nil && k != nil; k, v, err = keysCursor.Next() {
if ^binary.BigEndian.Uint64(v) > step {
continue
}
select {
case <-ctx.Done():
return ctx.Err()
Expand All @@ -1408,10 +1411,6 @@ func (d *Domain) prune(ctx context.Context, step, txFrom, txTo, limit uint64, lo
default:
}

if ^binary.BigEndian.Uint64(v) > step {
continue
}

seek := common.Append(k, v)
kk, _, err := valsC.SeekExact(seek)
if err != nil {
Expand Down

0 comments on commit 6dbd238

Please sign in to comment.