Merge pull request #12 from ipfs/fix/build-failure

fix build failures i introduced
This commit is contained in:
Jeromy Johnson
2016-11-23 10:14:26 -08:00
committed by GitHub
2 changed files with 4 additions and 4 deletions

4
cid.go
View File

@@ -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

View File

@@ -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()