-
Notifications
You must be signed in to change notification settings - Fork 113
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
Support /p2p addresses encoded as CIDs #130
Conversation
218e2d0
to
1db2c4a
Compare
48c8403
to
30a809b
Compare
transcoders.go
Outdated
codecStr := cid.CodecToStr[ty] | ||
if codecStr == "" { | ||
codecStr = fmt.Sprintf("[unknown multicodec %d]", ty) | ||
} |
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.
I copied this from go-libp2p-core, but is this overkill?
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.
Yeah, this seems like overkill. We can just fail.
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.
removed, look good?
30a809b
to
9eb5a88
Compare
btw @Stebalien any idea how I managed to decrease code coverage in this one area https://codecov.io/gh/multiformats/go-multiaddr/compare/2da13ecd1ade1ef08fc453f1b2527bd4edb5ec98...9eb5a88b0945beda7cee97da5086e82acd1a21ef/changes? When we had the extra error message for unknown codecs in 30a809b it didn't show that. Perhaps it's just a false signal 🤷♀️ |
I have no idea. Codecov is weird. |
This adds go-cid as a dependency of this library. If adding go-cid is contentious lmk and I can try and copy-paste the parts we need.
Not sure why codecov says the new code isn't tested. Pretty sure I've added enough new test cases. Extra eyes appreciated though.