Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gx/lastpubver
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.11: QmWAzSEoqZ6xU6pu8yL8e5WaMb7wtbfbhhN4p1DknUPtr3
0.2.0: QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM
8 changes: 4 additions & 4 deletions blocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ 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{}
}

// 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
}

Expand All @@ -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 {
Expand All @@ -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
}

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"gxDependencies": [
{
"author": "whyrusleeping",
"hash": "QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb",
"hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7",
"name": "go-cid",
"version": "0.8.0"
"version": "0.9.0"
},
{
"author": "multiformats",
Expand All @@ -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"
}