From ec5ea817e665f488a529046dc6aa12212a2c93f5 Mon Sep 17 00:00:00 2001 From: Kevin Atkinson Date: Wed, 5 Sep 2018 01:47:09 -0400 Subject: [PATCH 1/2] gx update go-cid and fix code to use new Cid type --- blocks.go | 8 ++++---- package.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/blocks.go b/blocks.go index 0ae7b03..3d3894b 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 38f195b..115ff96 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", From 071a086542e0c24bfd773f68aead14ceb77bc817 Mon Sep 17 00:00:00 2001 From: Kevin Atkinson Date: Tue, 11 Sep 2018 19:41:27 -0400 Subject: [PATCH 2/2] gx publish 0.2.0 --- .gx/lastpubver | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gx/lastpubver b/.gx/lastpubver index 04a13cc..ee41f5b 100644 --- a/.gx/lastpubver +++ b/.gx/lastpubver @@ -1 +1 @@ -0.1.11: QmWAzSEoqZ6xU6pu8yL8e5WaMb7wtbfbhhN4p1DknUPtr3 +0.2.0: QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM diff --git a/package.json b/package.json index 115ff96..83a6a61 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,6 @@ "license": "", "name": "go-block-format", "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.1.11" + "version": "0.2.0" }