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

Commit

Permalink
Merge pull request #35 from ipfs/fix-staticcheck
Browse files Browse the repository at this point in the history
fix staticcheck
  • Loading branch information
marten-seemann authored May 19, 2021
2 parents 43e8101 + 57aa7ef commit 3f7b66b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions offline.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (e *offlineExchange) HasBlock(b blocks.Block) error {
}

// Close always returns nil.
func (_ *offlineExchange) Close() error {
func (e *offlineExchange) Close() error {
// NB: exchange doesn't own the blockstore's underlying datastore, so it is
// not responsible for closing it.
return nil
Expand All @@ -44,11 +44,9 @@ func (e *offlineExchange) GetBlocks(ctx context.Context, ks []cid.Cid) (<-chan b
out := make(chan blocks.Block)
go func() {
defer close(out)
var misses []cid.Cid
for _, k := range ks {
hit, err := e.bs.Get(k)
if err != nil {
misses = append(misses, k)
// a long line of misses should abort when context is cancelled.
select {
// TODO case send misses down channel
Expand Down

0 comments on commit 3f7b66b

Please sign in to comment.