diff --git a/lib/bufbstore/buf_bstore.go b/lib/bufbstore/buf_bstore.go index e1aad94df..4b430828b 100644 --- a/lib/bufbstore/buf_bstore.go +++ b/lib/bufbstore/buf_bstore.go @@ -108,6 +108,15 @@ func (bs *BufferedBS) GetSize(c cid.Cid) (int, error) { } func (bs *BufferedBS) Put(blk block.Block) error { + has, err := bs.read.Has(blk.Cid()) + if err != nil { + return err + } + + if has { + return nil + } + return bs.write.Put(blk) }