Skip to content

Commit

Permalink
prevent scanning all undos entry ...
Browse files Browse the repository at this point in the history
  • Loading branch information
billettc committed Apr 4, 2024
1 parent 0a14f7e commit 6ca06c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func (db *OperationDB) Flush(ctx context.Context, cursor *sink.Cursor) (count in
func (db *OperationDB) PurgeUndoOperations(ctx context.Context, finalBlockHeight uint64) error {
keys := make([][]byte, 0)

scanOutput := db.store.Scan(ctx, undoKey(finalBlockHeight), undoKey(0), 0)
scanOutput := db.store.Scan(ctx, undoKey(finalBlockHeight), undoKey(finalBlockHeight-1000), 0)

if scanOutput.Err() != nil {
return fmt.Errorf("scanning undo operations for block %d: %w", finalBlockHeight, scanOutput.Err())
Expand Down

0 comments on commit 6ca06c8

Please sign in to comment.