-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
Currently, Prefix.MhLength is an int and -1 can be (and is) used to mean "default length". Unfortunately, this means:
cid1.Bytes() == cid2.Bytes()does not implycid1.Prefix() == cid2.Prefix().Prefix.Bytes()is broken.
Solutions:
- Make it a uint64, provide some convenience constructors constructors (e.g.
func V1Prefix(codec uint64, mhType uint64) Prefix). This will break things. - Fix
Prefix.Bytes()and provide anEqualsmethod (less convenient in the long run).
Thoughts?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels