-
Notifications
You must be signed in to change notification settings - Fork 6
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
Ignore multiaddrs with unknown protocols #30
Conversation
If new protocols, unknown to the indexer or assigner service, are encoded into multiaddrs in announce messages, then ignore these. This will allow older indexers to accept messages even when newer address types are included. Fixes issue #29
if err != nil { | ||
if strings.Contains(err.Error(), "no protocol with code") { |
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.
is this really our best way of identifying this error?
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 wish there was a type, but that will require a change here: https://github.com/multiformats/go-multiaddr/blob/master/protocol.go#L97
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.
that's "not protocol with name" rather than "no protocol with code"
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.
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.
filed as multiformats/go-multiaddr#199
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## main #30 +/- ##
==========================================
+ Coverage 50.25% 50.62% +0.36%
==========================================
Files 60 60
Lines 4913 4915 +2
==========================================
+ Hits 2469 2488 +19
+ Misses 2181 2166 -15
+ Partials 263 261 -2
☔ View full report in Codecov by Sentry. |
If new protocols, unknown to the indexer or assigner service, are encoded into multiaddrs in announce messages, then ignore these. This will allow older indexers to accept messages even when newer address types are included.
Fixes issue #29