blockstore: suppress exchange error
Juan Batiz-Benet committed
Jan 2, 2015 at 08:36 UTC
e5e194263802696ce5c9a1c8635ca9875bc4aa3b
1 file changed
+6
-2
blockservice/blockservice.go
+6
-2
@@ -50,9 +50,13 @@ func (s *BlockService) AddBlock(b *blocks.Block) (u.Key, error) {
50
// consider moving this to an sync process.
51
if s.Exchange != nil {
52
ctx := context.TODO()
53
- err = s.Exchange.HasBlock(ctx, b)
53
+ if err := s.Exchange.HasBlock(ctx, b); err != nil {
54
+ // suppress error, as the client shouldn't care about bitswap.
55
+ // the client only cares about the blockstore.Put.
56
+ log.Errorf("Exchange.HasBlock error: %s", err)
57
+ }
58
}
55
- return k, err
59
+ return k, nil
60
}
61
62
// GetBlock retrieves a particular block from the service,