From f623f824db540989b6e6d3296d480648c1f6df6e Mon Sep 17 00:00:00 2001 From: Jeromy Date: Wed, 23 Nov 2016 10:01:51 -0800 Subject: [PATCH] fix build failures i introduced --- cid.go | 4 ++-- cid_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cid.go b/cid.go index 87f878d..896391c 100644 --- a/cid.go +++ b/cid.go @@ -30,7 +30,7 @@ const ( func NewCidV0(h mh.Multihash) *Cid { return &Cid{ version: 0, - codec: Protobuf, + codec: DagProtobuf, hash: h, } } @@ -114,7 +114,7 @@ func Cast(data []byte) (*Cid, error) { } return &Cid{ - codec: Protobuf, + codec: DagProtobuf, version: 0, hash: h, }, nil diff --git a/cid_test.go b/cid_test.go index c03e281..0cf5225 100644 --- a/cid_test.go +++ b/cid_test.go @@ -93,7 +93,7 @@ func TestV0ErrorCases(t *testing.T) { func TestPrefixRoundtrip(t *testing.T) { data := []byte("this is some test content") hash, _ := mh.Sum(data, mh.SHA2_256, -1) - c := NewCidV1(CBOR, hash) + c := NewCidV1(DagCBOR, hash) pref := c.Prefix() @@ -122,7 +122,7 @@ func TestPrefixRoundtrip(t *testing.T) { func Test16BytesVarint(t *testing.T) { data := []byte("this is some test content") hash, _ := mh.Sum(data, mh.SHA2_256, -1) - c := NewCidV1(CBOR, hash) + c := NewCidV1(DagCBOR, hash) c.codec = 1 << 63 _ = c.Bytes()