-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ref(iroh-net): Remove need for relay info in best_addr (#2579)
## Description This moves metrics for when switches between direct connections and relayed connections to the NodeState. This is after all where this decision is made. BestAddr only knows about the best UDP address, it has no business keeping track of relays. Cleaning this up enables further refactoring of BestAddr and PathState which need to improve because they depend on each other, but are hindered by the relay state sneaking into there. ## Breaking Changes None ## Notes & open questions These metrics ignore the fact that we have mixed as a possibility so over-simplify the situation. This makes the logic to increment them complex, which in turn makes it no one will really know what they mean. I need this to move on with #2546 so don't really want to get into designing our metrics though. I believe this way the keep the same behaviour. ## Change checklist - [x] Self-review. - [x] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - [x] Tests if relevant. - [x] All breaking changes documented.
- Loading branch information
Showing
2 changed files
with
48 additions
and
27 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