Skip to content

Commit

Permalink
rename NewCidV1_SHA2_256
Browse files Browse the repository at this point in the history
  • Loading branch information
fredcarle committed May 6, 2022
1 parent 222bf6d commit 312214d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/cid.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
mh "github.com/multiformats/go-multihash"
)

func NewCidV1_SHA2_256(data []byte) (cid.Cid, error) {
func NewSHA256CidV1(data []byte) (cid.Cid, error) {
pref := cid.Prefix{
Version: 1,
Codec: cid.Raw,
Expand Down
4 changes: 2 additions & 2 deletions db/collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func (db *db) CreateCollection(
}

// add a reference to this DB by desc hash
cid, err := core.NewCidV1_SHA2_256(buf)
cid, err := core.NewSHA256CidV1(buf)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -203,7 +203,7 @@ func (db *db) GetCollectionByName(ctx context.Context, name string) (client.Coll
}

// add a reference to this DB by desc hash
cid, err := core.NewCidV1_SHA2_256(buf)
cid, err := core.NewSHA256CidV1(buf)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 312214d

Please sign in to comment.