Author | SHA1 | Message | Date |
---|---|---|---|
Erik Grinaker |
a741314c97
|
p2p: improve peerStore prototype (#5954)
This improves the `peerStore` prototype by e.g.: * Using a database with Protobuf for persistence, but also keeping full peer set in memory for performance. * Simplifying the API, by taking/returning struct copies for safety, and removing errors for in-memory operations. * Caching the ranked peer set, as a temporary solution until a better data structure is implemented. * Adding `PeerManagerOptions.MaxPeers` and pruning the peer store (based on rank) when it's full. * Rewriting `PeerAddress` to be independent of `url.URL`, normalizing it and tightening semantics. |
4 years ago |
Erik Grinaker | 91bef75f62 | p2p: rename PubKeyToID to NodeIDFromPubKey | 4 years ago |
Erik Grinaker | b4ce1de44a | p2p: rename NodeInfo.DefaultNodeID to NodeID | 4 years ago |
Erik Grinaker | 8e7d431f6f | p2p: rename ID to NodeID | 4 years ago |
Erik Grinaker |
84ff991387
|
p2p: add MemoryTransport, an in-memory transport for testing (#5827) | 4 years ago |