Skip to content

Commit

Permalink
handle eof error
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduard-Voiculescu committed Aug 9, 2024
1 parent 9f0a708 commit 3509f83
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion injective/cmd/fireinjective/tools_fix_unknown_type_blocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func fixUnknownTypeBlocksRunE(zlog *zap.Logger, tracer logging.Tracer) firecore.
}

var lastFilename string
var blockCount int
var blockCount = 0
err = srcStore.WalkFrom(ctx, "", fmt.Sprintf("%010d", firstStreamableBlock), func(filename string) error {
var fileReader io.Reader
fileReader, err = srcStore.OpenObject(ctx, filename)
Expand Down Expand Up @@ -135,6 +135,10 @@ func fixUnknownTypeBlocksRunE(zlog *zap.Logger, tracer logging.Tracer) firecore.
fmt.Println("done")
return nil
}
if errors.Is(err, io.EOF) {
fmt.Println("done")
return nil
}
return fmt.Errorf("walking source store: %w", err)
}

Expand Down

0 comments on commit 3509f83

Please sign in to comment.