-
Notifications
You must be signed in to change notification settings - Fork 964
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(swarm): introduce ConnectionId::new_unchecked
constructor
#3652
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.
I am going to directly release this after it merges to unblock @melekes. This is trivial in my eyes, hence I am merging this right away. |
This pull request has merge conflicts. Could you please resolve them @thomaseizinger? 🙏 |
@thomaseizinger @mxinden what is the timeline for the next patch release (0.51.2)? we're (Parity) interested in this change specifically. I can create a PR if necessary. |
I will try tomorrow. No promises @melekes. |
Description
In earlier iterations of the design for generic connection management, we removed the
ConnectionId::new
constructor because it would have allowed users to createConnectionId
s that are already taken, thus breaking invariants thatNetworkBehaviour
s rely on. Later, we incorporated the creation ofConnectionId
inDialOpts
which mitigates this risk altogether.Thus, it is reasonably safe to introduce a public, non-deprecated constructor for
ConnectionId
that can be used for tests.Related #3327 (comment).
Notes & open questions
cc @melekes
Change checklist