Skip to content

Commit ed66fe6

Browse files
committed
make error handling consistent
1 parent 961b3f7 commit ed66fe6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/store/store.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,9 @@ func (s *DefaultStore) PruneBlocks(ctx context.Context, height uint64) error {
318318
}
319319

320320
if err := batch.Delete(ctx, ds.NewKey(getHeaderKey(h))); err != nil {
321-
return fmt.Errorf("failed to delete header at height %d during pruning: %w", h, err)
321+
if !errors.Is(err, ds.ErrNotFound) {
322+
return fmt.Errorf("failed to delete header at height %d during pruning: %w", h, err)
323+
}
322324
}
323325

324326
if err := batch.Delete(ctx, ds.NewKey(getDataKey(h))); err != nil {

0 commit comments

Comments
 (0)