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

fix(kad): actually report unsupported protocol #4639

Merged
merged 5 commits into from
Oct 14, 2023
Merged

Conversation

thomaseizinger
Copy link
Contributor

Description

It turns out, we never actually used ProtocolStatus::NotSupported. Or at least, we never constructed it within the Handler. This didn't get flagged by rustc because

a) we allowed the dead_code lint across libp2p-kad
b) the HandlerEvent enum is public and thus could be constructed by users

Related: #4632.
Related: #4633.

Notes & open questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

A story of the power of Rust and how not to make use of it.

Good catch!

Missing a changelog entry, right? Otherwise looks good to me.

@thomaseizinger
Copy link
Contributor Author

Missing a changelog entry, right?

If only CI would tell me! Oh wait 😁

@mergify mergify bot merged commit d72c67d into master Oct 14, 2023
@mergify mergify bot deleted the fix/kad-protocol-status branch October 14, 2023 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants