Skip to content
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

Merged
merged 2 commits into from
Aug 17, 2020

Conversation

aschmahmann
Copy link
Contributor

@aschmahmann aschmahmann commented Aug 11, 2020

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.

transcoders.go Show resolved Hide resolved
transcoders.go Show resolved Hide resolved
transcoders.go Outdated Show resolved Hide resolved
@aschmahmann aschmahmann force-pushed the feat/parse-peerids-from-cids branch 3 times, most recently from 48c8403 to 30a809b Compare August 12, 2020 05:26
transcoders.go Outdated
Comment on lines 319 to 322
codecStr := cid.CodecToStr[ty]
if codecStr == "" {
codecStr = fmt.Sprintf("[unknown multicodec %d]", ty)
}
Copy link
Contributor Author

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?

Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed, look good?

@aschmahmann
Copy link
Contributor Author

aschmahmann commented Aug 12, 2020

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 🤷‍♀️

@Stebalien
Copy link
Member

I have no idea. Codecov is weird.

@aschmahmann aschmahmann merged commit 26a85b9 into master Aug 17, 2020
@aschmahmann aschmahmann mentioned this pull request Sep 22, 2020
72 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants