Skip to content

Commit

Permalink
blockstore: suppress exchange error
Browse files Browse the repository at this point in the history
  • Loading branch information
jbenet committed Jan 2, 2015
1 parent ef182f1 commit e5e1942
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions blockservice/blockservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,13 @@ func (s *BlockService) AddBlock(b *blocks.Block) (u.Key, error) {
// consider moving this to an sync process.
if s.Exchange != nil {
ctx := context.TODO()
err = s.Exchange.HasBlock(ctx, b)
if err := s.Exchange.HasBlock(ctx, b); err != nil {
// suppress error, as the client shouldn't care about bitswap.
// the client only cares about the blockstore.Put.
log.Errorf("Exchange.HasBlock error: %s", err)
}
}
return k, err
return k, nil
}

// GetBlock retrieves a particular block from the service,
Expand Down

0 comments on commit e5e1942

Please sign in to comment.