feat(ipns): helper ValidateWithPeerID and UnmarshalIpnsEntry#294
Merged
feat(ipns): helper ValidateWithPeerID and UnmarshalIpnsEntry#294
Conversation
Codecov Report
@@ Coverage Diff @@
## main #294 +/- ##
==========================================
- Coverage 48.02% 48.00% -0.02%
==========================================
Files 279 279
Lines 33439 33451 +12
==========================================
Hits 16059 16059
- Misses 15694 15703 +9
- Partials 1686 1689 +3
|
1 task
2e10687 to
88ba464
Compare
Jorropo
requested changes
May 10, 2023
Contributor
Jorropo
left a comment
There was a problem hiding this comment.
LGTM once thoses minors things are fixed.
0b41ecc to
50d2bc2
Compare
Jorropo
approved these changes
May 10, 2023
14 tasks
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.
After my overly excited merge and revert of #292, I looked at the code and saw we were already duplicating existing code. E.g. the key extraction logic already existed and was being duplicated. This PR adds two helper functions
ValidateWithPeerIDandUnmarshalIpnsEntry. They already use existing functionality. I also added tests.I did not include
IpnsInspectEntryfor the reasons here: #292 (comment) - it doesn't make sense for us to be adding it here since it is tightly related to the type we use inipfs name inspect. We only created it in first place to simplify the type used by the RPC client in Kubo.I also enabled a test that has been disabled for 5 years in 0320605. It seems to pass now, and reading the commit description, I don't think it is a problem due to the way Peer IDs are encoded nowadays.
Tested in Kubo here: ipfs/kubo#9867