Skip to content

Commit

Permalink
feat(iroh-net): persist known peer info (#1488)
Browse files Browse the repository at this point in the history
## 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
divagant-martian authored Sep 25, 2023
1 parent f72ffe6 commit 032e643
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 032e643

Please sign in to comment.