Support /p2p addresses encoded as CIDs#130
Merged
aschmahmann merged 2 commits intomasterfrom Aug 17, 2020
Merged
Conversation
Stebalien
requested changes
Aug 11, 2020
218e2d0 to
1db2c4a
Compare
Stebalien
approved these changes
Aug 12, 2020
Stebalien
requested changes
Aug 12, 2020
48c8403 to
30a809b
Compare
aschmahmann
commented
Aug 12, 2020
transcoders.go
Outdated
Comment on lines
+319
to
+322
| codecStr := cid.CodecToStr[ty] | ||
| if codecStr == "" { | ||
| codecStr = fmt.Sprintf("[unknown multicodec %d]", ty) | ||
| } |
Contributor
Author
There was a problem hiding this comment.
I copied this from go-libp2p-core, but is this overkill?
Member
There was a problem hiding this comment.
Yeah, this seems like overkill. We can just fail.
Contributor
Author
There was a problem hiding this comment.
removed, look good?
aschmahmann
commented
Aug 12, 2020
Stebalien
approved these changes
Aug 12, 2020
aschmahmann
commented
Aug 12, 2020
30a809b to
9eb5a88
Compare
Contributor
Author
|
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 🤷♀️ |
Member
|
I have no idea. Codecov is weird. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.