-
Notifications
You must be signed in to change notification settings - Fork 965
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: report changes in supported protocols to ConnectionHandler
#3651
Merged
Merged
Changes from all commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
f2801fb
Report changes in supported protocols back to `ConnectionHandler`
thomaseizinger 9a28cd2
Allow reporting of supported protocols by remote
thomaseizinger e536dea
Consume supported protocols in identify
thomaseizinger 7699a1e
Report a remote's protocols to other handlers
thomaseizinger 450fc1e
Add test for kademlia client mode
thomaseizinger a972b9c
Implement kademlia client-mode
thomaseizinger f9cf33f
Add tests for two servers connecting
thomaseizinger deb30f3
Report additions and removals of protocols instead
thomaseizinger 3c1bf5f
Report listen protocols on startup to connection
thomaseizinger 9e70729
Introduce `SupportedProtocols` type
thomaseizinger f1328c5
Deduplicate code and propagate supported protocols only once
thomaseizinger a4fbcda
Extend docs
thomaseizinger 3e33108
Merge branch 'master' into 2680-explore
thomaseizinger 572ed90
Fix compile errors
thomaseizinger 586394b
Report changes to listen/external address set
thomaseizinger b329a09
Simplify identify protocol
thomaseizinger a63af89
Check for changes in inbound protocols on every poll
thomaseizinger 72510dd
Fix clippy lints
thomaseizinger 8ffafdd
Report changes in `SupportedProtocols`
thomaseizinger ea1a087
Only report changes to handler if there actually was a change
thomaseizinger 27bc507
Do not implicitly dial peers upon push
thomaseizinger 58039d9
Merge branch 'master' into 2680-explore
thomaseizinger 74dd94a
Remove unused import
thomaseizinger 628b519
Fix compile error
thomaseizinger c7b5011
Remove dbg!
thomaseizinger a02ca55
Update swarm/src/handler.rs
thomaseizinger c347c8a
Merge branch '2680-explore' of github.com:libp2p/rust-libp2p into 268…
thomaseizinger f3e5e71
Combine match arms where possible
thomaseizinger b7fa7ef
Add comment explaining static hashset
thomaseizinger 2bd9d73
Add docs
thomaseizinger e90c40d
Update supported protocols for push messages
thomaseizinger 84979e4
Use `pop` to avoid panicking branch in `remove`
thomaseizinger dbfc7e7
Use `poll_unpin`
thomaseizinger f2d2c88
Use `if let` for consistency
thomaseizinger b41aeb8
Rewrite to `if let` for consistency
thomaseizinger bcd872b
Fill in todo in toggle
thomaseizinger 021f1d4
Merge branch 'master' into 2680-explore
thomaseizinger fb096ad
Merge branch 'master' into 2680-explore
thomaseizinger e95c738
Merge branch 'master' into 2680-explore
thomaseizinger 82642b8
Restore `libp2p-kad`
thomaseizinger eb66489
Fix formatting
thomaseizinger 8c47bd6
Fix unit tests
thomaseizinger bf9421e
Change test to assert actual events received
thomaseizinger a82343a
Don't report empty set of protocols to handler
thomaseizinger 19cd9b9
Use constructor
thomaseizinger 6d3e9ee
Introduce test helper
thomaseizinger df93a4e
Make tests less noisy
thomaseizinger c50bcfd
Further simplify test and add comments
thomaseizinger a799798
Add failing test
thomaseizinger 0260ad1
Make test pass, i.e. only report actual changes back to the handler
thomaseizinger bf99654
Extract helpers to make fields crate-private and add docs
thomaseizinger 46f4e96
Return `SmallVec` from `from_full_sets` which allows iteration
thomaseizinger ae7fc93
Fix clippy warnings
thomaseizinger fe9a6e3
Fix rustdoc
thomaseizinger d7651b4
Merge branch 'master' into 2680-explore
thomaseizinger 75681c1
Add changelog entry
thomaseizinger bdfb04f
Merge branch 'master' into 2680-explore
thomaseizinger 88362e5
Sort imports
thomaseizinger 3c8d326
Merge branch 'master' into 2680-explore
thomaseizinger 77e4e5b
Merge branch 'master' into 2680-explore
thomaseizinger 5a772e1
Merge branch 'master' into 2680-explore
thomaseizinger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
Just a note for sometime in the future, ideally we would prioritize the addresses we send to a remote, e.g. we should prioritize (in terms of order in the list) external addresses over listening addresses. Again, not for this pull request.
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 is an easy enough change!
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.
It actually isn't because we are collecting in a
HashSet
and thus lose any ordering.