Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Marcin Rataj <[email protected]>
  • Loading branch information
hacdias and lidel authored Feb 22, 2023
1 parent 643f8b3 commit 87cd7ab
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions blockstore_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (ps *proxyBlockStore) fetch(ctx context.Context, c cid.Cid) (blocks.Block,
defer resp.Body.Close()

if resp.StatusCode != http.StatusOK {
return nil, fmt.Errorf("unexpected status from remote gateway: %s", resp.Status)
return nil, fmt.Errorf("http error from block gateway: %s", resp.Status)
}

rb, err := io.ReadAll(resp.Body)
Expand All @@ -64,7 +64,6 @@ func (ps *proxyBlockStore) fetch(ctx context.Context, c cid.Cid) (blocks.Block,
return nil, blocks.ErrWrongHash
}
if !nc.Equals(c) {
fmt.Printf("got %s vs %s\n", nc, c)
return nil, blocks.ErrWrongHash
}
}
Expand Down

0 comments on commit 87cd7ab

Please sign in to comment.