提交 e5e19426 作者: Juan Batiz-Benet

blockstore: suppress exchange error

上级 ef182f11
...@@ -50,9 +50,13 @@ func (s *BlockService) AddBlock(b *blocks.Block) (u.Key, error) { ...@@ -50,9 +50,13 @@ func (s *BlockService) AddBlock(b *blocks.Block) (u.Key, error) {
// consider moving this to an sync process. // consider moving this to an sync process.
if s.Exchange != nil { if s.Exchange != nil {
ctx := context.TODO() 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, // GetBlock retrieves a particular block from the service,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论