-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(iroh-net): do not persist invalid node addresses (#2209)
## Description Changes the logic of which addresses are persisted in the magic endpoint: * For nodes that were used in the current session, only the paths that were successfully used will be saved. This means that invalid paths will be omitted. If all paths are invalid, and no relay URL is known, the node will not be persisted at all. * For nodes that were not used at all, all known information will be persisted. This is in place to not forget all info if a node starts, loads the addressbook, and then shuts down again without doing anything. ## Notes & open questions Still needs a test for the new behavior, will do tomorrow ## Change checklist - [ ] Self-review. - [ ] Documentation updates if relevant. - [ ] Tests if relevant.
- Loading branch information
Showing
2 changed files
with
82 additions
and
35 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