CandidateSet: Add Listener Port Connections
Inbound connections on the Zcash protocol listener port perform a handshake. If the handshake is successful, it adds the peer to the AddressBook.
This commit is contained in:
parent
03aa6f671f
commit
e50692bd51
|
|
@ -16,9 +16,10 @@ use crate::{types::MetaAddr, AddressBook, BoxError, PeerAddrState, Request, Resp
|
||||||
/// It divides the set of all possible candidate peers into disjoint subsets,
|
/// It divides the set of all possible candidate peers into disjoint subsets,
|
||||||
/// using the `PeerAddrState`:
|
/// using the `PeerAddrState`:
|
||||||
///
|
///
|
||||||
/// 1. `Responded` peers, which we previously connected to. If we have not received
|
/// 1. `Responded` peers, which we previously had inbound or outbound connections
|
||||||
/// any messages from a `Responded` peer within a cutoff time, we assume that it
|
/// to. If we have not received any messages from a `Responded` peer within a
|
||||||
/// has disconnected or hung, and attempt reconnection;
|
/// 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
|
/// 2. `NeverAttempted` peers, which we learned about from other peers or a DNS
|
||||||
/// seeder, but have never connected to;
|
/// seeder, but have never connected to;
|
||||||
/// 3. `Failed` peers, to whom we attempted to connect but were unable to;
|
/// 3. `Failed` peers, to whom we attempted to connect but were unable to;
|
||||||
|
|
@ -42,13 +43,13 @@ use crate::{types::MetaAddr, AddressBook, BoxError, PeerAddrState, Request, Resp
|
||||||
/// │ │
|
/// │ │
|
||||||
/// │ │
|
/// │ │
|
||||||
/// │ │
|
/// │ │
|
||||||
/// │ │
|
/// │ ┌──────────────────┐ │
|
||||||
/// │ │
|
/// │ │ Listener Port │ │
|
||||||
/// │ │
|
/// │ │ Peer Connections │ │
|
||||||
/// │ │
|
/// │ └──────────────────┘ │
|
||||||
/// │ │
|
/// │ │ │
|
||||||
/// ├───────────────────────────────┼───────────────────────────────┐
|
/// ├──────────┼────────────────────┼───────────────────────────────┐
|
||||||
/// │ PeerSet AddressBook ▼ │
|
/// │ PeerSet ▼ AddressBook ▼ │
|
||||||
/// │ ┌─────────────┐ ┌────────────────┐ ┌─────────────┐ │
|
/// │ ┌─────────────┐ ┌────────────────┐ ┌─────────────┐ │
|
||||||
/// │ │ Possibly │ │`NeverAttempted`│ │ `Failed` │ │
|
/// │ │ Possibly │ │`NeverAttempted`│ │ `Failed` │ │
|
||||||
/// │ │Disconnected │ │ Peers │ │ Peers │◀┼┐
|
/// │ │Disconnected │ │ Peers │ │ Peers │◀┼┐
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue