-
Notifications
You must be signed in to change notification settings - Fork 95
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
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
|
2e10687
to
88ba464
Compare
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.
LGTM once thoses minors things are fixed.
0b41ecc
to
50d2bc2
Compare
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
ValidateWithPeerID
andUnmarshalIpnsEntry
. They already use existing functionality. I also added tests.I did not include
IpnsInspectEntry
for 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