diff --git a/blocks.go b/blocks.go index 0ae7b03d4a92ebcef62d9b637cf5eab1ae55cff2..3d3894b3f3a90959134500d1f3da054203f305bd 100644 --- a/blocks.go +++ b/blocks.go @@ -19,7 +19,7 @@ var ErrWrongHash = errors.New("data did not match given hash") // Block provides abstraction for blocks implementations. type Block interface { RawData() []byte - Cid() *cid.Cid + Cid() cid.Cid String() string Loggable() map[string]interface{} } @@ -27,7 +27,7 @@ type Block interface { // A BasicBlock is a singular block of data in ipfs. It implements the Block // interface. type BasicBlock struct { - cid *cid.Cid + cid cid.Cid data []byte } @@ -40,7 +40,7 @@ func NewBlock(data []byte) *BasicBlock { // NewBlockWithCid creates a new block when the hash of the data // is already known, this is used to save time in situations where // we are able to be confident that the data is correct. -func NewBlockWithCid(data []byte, c *cid.Cid) (*BasicBlock, error) { +func NewBlockWithCid(data []byte, c cid.Cid) (*BasicBlock, error) { if u.Debug { chkc, err := c.Prefix().Sum(data) if err != nil { @@ -65,7 +65,7 @@ func (b *BasicBlock) RawData() []byte { } // Cid returns the content identifier of the block. -func (b *BasicBlock) Cid() *cid.Cid { +func (b *BasicBlock) Cid() cid.Cid { return b.cid } diff --git a/package.json b/package.json index 38f195b6e3e70cde56df1fc8d06eca0ae92efb93..115ff96fccc5676db3de71f9835a7bd18d16c3c2 100644 --- a/package.json +++ b/package.json @@ -9,9 +9,9 @@ "gxDependencies": [ { "author": "whyrusleeping", - "hash": "QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb", + "hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7", "name": "go-cid", - "version": "0.8.0" + "version": "0.9.0" }, { "author": "multiformats",