-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Remove utils package #397
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #397 +/- ##
===========================================
+ Coverage 65.49% 65.64% +0.14%
===========================================
Files 81 80 -1
Lines 9492 9471 -21
===========================================
Hits 6217 6217
+ Misses 2645 2624 -21
Partials 630 630
|
|
||
import ( | ||
"github.com/ipfs/go-cid" | ||
mh "github.com/multiformats/go-multihash" | ||
) | ||
|
||
func NewCidV1(data []byte) (cid.Cid, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed we were using another function with a similar name from ipfs/go-cid
, signature: func NewCidV1(codecType uint64, mhash mh.Multihash) Cid {...}
in datastore/blockstore.go
and api/http/api.go
.
so, changed the name to differentiate and to be explicit about always having SHA2_256 MhType (fine to revert back to the same name if there is preference).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - cheers for sorting out :)
- RELATED ISSUE(S): Resolves sourcenetwork#396 - DESCRIPTION: Remove the utils package to avoid import dependencies between multiple packages. Devs are ready to have a little code duplication as a trade off.
Resolves: #396