Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CandidateSet: Document Listener Port Connections #1852

Merged
merged 1 commit into from
Mar 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions zebra-network/src/peer_set/candidate_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ use crate::{types::MetaAddr, AddressBook, BoxError, PeerAddrState, Request, Resp
/// It divides the set of all possible candidate peers into disjoint subsets,
/// using the `PeerAddrState`:
///
/// 1. `Responded` peers, which we previously connected to. If we have not received
/// any messages from a `Responded` peer within a cutoff time, we assume that it
/// has disconnected or hung, and attempt reconnection;
/// 1. `Responded` peers, which we previously had inbound or outbound connections
/// to. If we have not received any messages from a `Responded` peer within a
/// cutoff time, we assume that it has disconnected or hung, and attempt
/// reconnection;
/// 2. `NeverAttempted` peers, which we learned about from other peers or a DNS
/// seeder, but have never connected to;
/// 3. `Failed` peers, to whom we attempted to connect but were unable to;
Expand All @@ -37,13 +38,13 @@ use crate::{types::MetaAddr, AddressBook, BoxError, PeerAddrState, Request, Resp
/// │ │
/// │ │
/// │ │
/// │
/// │
/// │
/// │
/// │
/// ├──────────────────────────────┼───────────────────────────────┐
/// │ PeerSet AddressBook ▼ │
/// │ ┌──────────────────┐
/// │ │ Listener Port
/// │ │ Peer Connections │
/// │ └──────────────────┘
/// │
/// ├──────────────────────────────┼───────────────────────────────┐
/// │ PeerSet ▼ AddressBook ▼ │
/// │ ┌─────────────┐ ┌────────────────┐ ┌─────────────┐ │
/// │ │ Possibly │ │`NeverAttempted`│ │ `Failed` │ │
/// │ │Disconnected │ │ Peers │ │ Peers │◀┼┐
Expand Down