Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(iroh-net): persist known peer info (#1488)
## Description Rough list of changes - add an option to the `MagicEndpointBuilder` to set the path in which peers are saved. This is used to read peers on start up and store them on an interval and on shutdown. - add `KnownPeers` to ease serializing and deserializing peer info - move the logic of `add_known_addr` to the `PeerMap` to facilitate instantiating from a known peer list - Add an `IrohPath` for the peers. - Add an option to the `Node`s builder to set the path, passed down to the endpoint. - For serialization it makes sense to have an object modelling the peer addressing info. This is the `AddrInfo`, which now replaces the custom `IrohInfo` ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [x] Self-review. - [x] Documentation updates if relevant. - [x] Tests if relevant.
- Loading branch information