Commit 280ec1f7 authored by Kevin Atkinson's avatar Kevin Atkinson

gx update go-cid and fix code to use new Cid type

parent f9c8f6d8
......@@ -13,9 +13,9 @@
},
{
"author": "whyrusleeping",
"hash": "QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb",
"hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7",
"name": "go-cid",
"version": "0.8.0"
"version": "0.9.0"
}
],
"gxVersion": "0.12.1",
......
......@@ -48,7 +48,7 @@ func IsGoodHash(code uint64) bool {
return false
}
func ValidateCid(c *cid.Cid) error {
func ValidateCid(c cid.Cid) error {
pref := c.Prefix()
if !IsGoodHash(pref.MhType) {
return ErrPossiblyInsecureHashFunction
......
......@@ -32,7 +32,7 @@ func TestValidateCids(t *testing.T) {
assertFalse(IsGoodHash(mh.BLAKE2B_MIN + 5))
mhcid := func(code uint64, length int) *cid.Cid {
mhcid := func(code uint64, length int) cid.Cid {
mhash, err := mh.Sum([]byte{}, code, length)
if err != nil {
t.Fatal(err)
......@@ -41,7 +41,7 @@ func TestValidateCids(t *testing.T) {
}
cases := []struct {
cid *cid.Cid
cid cid.Cid
err error
}{
{mhcid(mh.SHA2_256, 32), nil},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment