-
Notifications
You must be signed in to change notification settings - Fork 995
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
core: make upgrade::apply
an implementation detail of transport upgrades
#3748
Comments
@mxinden please voice your opinion on this. |
The order of things to achieve this is:
|
Sorry for the late reply. Fine by me. Is the change worth the effort though? I would not give it a high priority. |
I think it is worth the effort but I agree that it is not high priority. I am working on it as a small side project. Plus, I think the linked changes are a net-positive by themselves. |
Also, really what I am doing is resolving your TODO from a year ago: 96dbfcd#diff-f176cef6da6d32fd9e595a428f86a279f3d84f0a06e41ab3b98491737048a91eR30 🙃 |
This patch refactors the identify tests to use `libp2p-swarm-test`. This allows us to delete quite a bit of code and makes several dev-dependencies obsolete. The `correct_transfer` test is made obsolete by more precise assertions in the `periodic_identify` test. This allows us to remove the dependency on the `upgrade::{apply_inbound,apply_outbound}` functions. Finally, we also fix a bug where the reported listen addresses to the other node could contain duplicates. Related: #3748. Pull-Request: #3851.
This patch tackles two things at once that are fairly intertwined: 1. There is no such thing as a "substream" in libp2p, the spec and other implementations only talk about "streams". We fix this by deprecating `NegotiatedSubstream`. 2. Previously, `NegotiatedSubstream` was a type alias that pointed to a type from `multistream-select`, effectively leaking the version of `multistream-select` to all dependencies of `libp2p-swarm`. We fix this by introducing a `Stream` newtype. Resolves: #3759. Related: #3748. Pull-Request: #3912.
Description
Currently, we expose the generic
upgrade::apply
function. I'd suggest we make it an implementation detail and transition all usages to something else. The usages are only in tests and infrom_fn
(which I am suggesting to remove: #3747).Motivation
Smaller, more focused API surface.
Are you planning to do it yourself in a pull request?
Yes.
The text was updated successfully, but these errors were encountered: