-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(iroh-net)!: Rename endpoint for nodes to node_state (#2222)
## Description We still have too many things named "endpoint", this targets cleaning up the naming of the state for each node that is stored in the NodeMap. This is now called `NodeState` instead of `Endpoint`. All related APIs now talk about nodes and node states instead of endpoints. Another minor cleanup is in the `NodeState` we had private fields with accessor functions, except for one field which was directly accessible. This is migrated to accessor functions for consistency as well. Finally it marks the visibility of some functions more explicitly, the visibility of those was already as such. This makes it easier to work and realise the impact changes have however. ## Breaking Changes * `MagicSock::tracked_endpoints` -> `MagicSock::connection_infos` * `MagicSock::tracked_endpoint` -> `MagicSock::connection_info` * `magicsock::EndpointInfo` -> `magicsock::ConnectionInfo` ## Notes & open questions Finally had to courage to change this, it's much less worse than I feared and to me it really helps calling this `NodeState`. I find it a noticeable improvement. ## Change checklist - [x] Self-review. - [x] Documentation updates if relevant. - [x] Tests if relevant. - [x] All breaking changes documented.
- Loading branch information
Showing
5 changed files
with
199 additions
and
185 deletions.
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
Oops, something went wrong.