Expand description
Persistence for the Kademlia routing table.
On every save tick (600 s) and on daemon shutdown, the set of peer
multi-addresses discovered via mDNS or Identify is written to
~/.local/share/billpouch/kad_peers.json.
On the next daemon startup, KadPeers::load reads that file and the
network loop dials each saved address. This lets the node reconnect to
previously-known peers instantly, without waiting for mDNS multicast.
§File format
Plain JSON object mapping peer_id_string → [multiaddr_string, ...].
{
"12D3KooW...": ["/ip4/192.168.1.10/tcp/41000", "/ip6/.../tcp/41001"],
...
}Structs§
- KadPeers
- Persisted map of
peer_id → [multiaddr_string, ...].