-
Notifications
You must be signed in to change notification settings - Fork 959
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(kad): emit ToSwarm::NewExternalAddrOfPeer
#5549
feat(kad): emit ToSwarm::NewExternalAddrOfPeer
#5549
Conversation
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.
Looks good to me, thanks @PanGan21 !
This pull request has merge conflicts. Could you please resolve them @PanGan21? 🙏 |
@PanGan21 Will this emit |
Hi @Wiezzel , I believe it will not. In which cases would this be required? |
Let's say you would like to discover an addr of a peer (e.g. to establish a connection). So, you start a |
Let's continue the discussion at #5103 |
## Description <!-- Please write a summary of your changes and why you made them. This section will appear as the commit message after merging. Please craft it accordingly. For a quick primer on good commit messages, check out this blog post: https://cbea.ms/git-commit/ Please include any relevant issues in here, for example: Related https://github.com/libp2p/rust-libp2p/issues/ABCD. Fixes https://github.com/libp2p/rust-libp2p/issues/XYZ. --> Updates `libp2p-kad` to emit new event `ToSwarm::NewExternalAddrOfPeer` whenever it discovers a new address through the DHT. Related: libp2p#5103 ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR which don't need to go into the final commit message. --> ## Change checklist <!-- Please add a Changelog entry in the appropriate crates and bump the crate versions if needed. See <https://github.com/libp2p/rust-libp2p/blob/master/docs/release.md#development-between-releases>--> - [X] I have performed a self-review of my own code - [ ] I have made corresponding changes to the documentation - [X] 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 --------- Co-authored-by: Guillaume Michel <[email protected]>
Description
Updates
libp2p-kad
to emit new eventToSwarm::NewExternalAddrOfPeer
whenever it discovers a new address through the DHT.Related: #5103
Notes & open questions
Change checklist