Compare commits

..

5 Commits

Author SHA1 Message Date
Jeromy
40c5ff1bfe gx publish 0.7.9 2017-02-02 18:53:37 -08:00
Jeromy
ebda3c73ae actually update multihash package 2017-02-02 18:53:32 -08:00
Jeromy
03f8d08574 gx publish 0.7.8 2017-02-02 18:39:03 -08:00
Jeromy
4ff5ee2b99 Update go-multibase, multihash. add test for hex 2017-02-02 18:39:00 -08:00
Jeromy Johnson
2b1b4a8339 Merge pull request #13 from ipfs/feat/gx-update-tree-hnwcen
gx update-tree go-cid go-libp2p-interface-pnet
2016-11-25 10:30:18 -08:00
4 changed files with 19 additions and 7 deletions

View File

@@ -1 +1 @@
0.7.7: QmcTcsTvfaeEBRFo1TkFgT8sRmgi1n1LTZpecfVP8fzpGD
0.7.9: QmcqyBnUyn9NYC9nusuHw5rSBaXGqhfLb7wFh61ohGc2pK

4
cid.go
View File

@@ -248,7 +248,7 @@ func (c *Cid) Prefix() Prefix {
type Prefix struct {
Version uint64
Codec uint64
MhType int
MhType uint64
MhLength int
}
@@ -302,7 +302,7 @@ func PrefixFromBytes(buf []byte) (Prefix, error) {
return Prefix{
Version: vers,
Codec: codec,
MhType: int(mhtype),
MhType: mhtype,
MhLength: int(mhlen),
}, nil
}

View File

@@ -188,3 +188,15 @@ func TestParse(t *testing.T) {
}
}
}
func TestHexDecode(t *testing.T) {
hexcid := "f015512209d8453505bdc6f269678e16b3e56c2a2948a41f2c792617cc9611ed363c95b63"
c, err := Decode(hexcid)
if err != nil {
t.Fatal(err)
}
if c.String() != "zb2rhhFAEMepUBbGyP1k8tGfz7BSciKXP6GHuUeUsJBaK6cqG" {
t.Fatal("hash value failed to round trip decoding from hex")
}
}

View File

@@ -9,13 +9,13 @@
"gxDependencies": [
{
"author": "whyrusleeping",
"hash": "QmYDds3421prZgqKbLpEK7T9Aa2eVdQ7o3YarX1LVLdP2J",
"hash": "QmbZ6Cee2uHjG7hf19qLHppgKDRtaG4CVtMzdmK9VCVqLu",
"name": "go-multihash",
"version": "1.0.0"
"version": "1.0.2"
},
{
"author": "whyrusleeping",
"hash": "QmUq3H9YpcPphbRj6ct6rBgBE377A8wANP8zPMRqe1WYbf",
"hash": "QmXzWFN4iLdX1Vq8Sc13mET7aXsHkTyJoMbaJJD3NGRhiJ",
"name": "go-multibase",
"version": "0.2.1"
}
@@ -25,6 +25,6 @@
"license": "MIT",
"name": "go-cid",
"releaseCmd": "git commit -a -m \"gx publish $VERSION\"",
"version": "0.7.7"
"version": "0.7.9"
}