mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
doc: fix various hosts documentation
This commit is contained in:
@@ -47,8 +47,9 @@ pub mod refinery;
|
||||
///
|
||||
/// `HostColor`: White hosts have been seen recently. Gold hosts we have been able to establish
|
||||
/// a connection to. Grey hosts are recently received hosts that are periodically refreshed
|
||||
/// using the greylist refinery. Black hosts are considerede hostile and are strictly avoided
|
||||
/// for the duration of the program.
|
||||
/// using the greylist refinery. Black hosts are considered hostile and are strictly avoided
|
||||
/// for the duration of the program. Dark hosts are hosts that do not match our transports, but
|
||||
/// that we continue to share with other peers. They are otherwise ignored.
|
||||
///
|
||||
/// `HostState`: a set of mutually exclusive states that can be Insert, Refine, Connect, Suspend
|
||||
/// or Connected. The state is `None` when the corresponding host has been removed from the
|
||||
|
||||
@@ -60,16 +60,15 @@ pub type HostRegistry = RwLock<HashMap<Url, HostState>>;
|
||||
/// +------+ +---------+
|
||||
/// +------> | move | ---> | suspend |
|
||||
/// | +------+ +---------+
|
||||
/// | ^ | +--------+
|
||||
/// | | | | insert |
|
||||
/// | v +--------+
|
||||
/// +---------+ | +--------+ |
|
||||
/// | connect | | | refine | |
|
||||
/// | ^ |
|
||||
/// | | v +--------+
|
||||
/// +---------+ | +--------+ | insert |
|
||||
/// | connect | | | refine | +--------+
|
||||
/// +---------+ | +--------+ |
|
||||
/// | v | v
|
||||
/// | +-----------+ | +------+
|
||||
/// +---> | connected | <-------+------> | None |
|
||||
/// +-----------+ +------+
|
||||
/// | +-----------+ | +------+
|
||||
/// +---> | connected | <-------+-------> | None |
|
||||
/// +-----------+ +------+
|
||||
/// |
|
||||
/// v
|
||||
/// +------+
|
||||
@@ -853,9 +852,8 @@ impl Hosts {
|
||||
// Loop through hosts selected by Outbound Session and see if any of them are
|
||||
// free to connect to.
|
||||
pub async fn check_addrs(&self, hosts: Vec<(Url, u64)>) -> Option<(Url, u64)> {
|
||||
debug!(target: "net::hosts::check_addrs()", "Starting checks");
|
||||
for (host, last_seen) in hosts {
|
||||
debug!(target: "net::hosts::check_addrs()", "Starting checks");
|
||||
|
||||
// Print a warning if we are trying to connect to a seed node in
|
||||
// Outbound session. This shouldn't happen as we reject configured
|
||||
// seed nodes from entering our hostlist in filter_addrs().
|
||||
@@ -867,7 +865,7 @@ impl Hosts {
|
||||
}
|
||||
|
||||
if let Err(e) = self.try_register(host.clone(), HostState::Connect).await {
|
||||
debug!(target: "net::hosts::check_addrs", "Skipping addr={}, err={}",
|
||||
trace!(target: "net::hosts::check_addrs", "Skipping addr={}, err={}",
|
||||
host.clone(), e);
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -55,9 +55,8 @@ use crate::Result;
|
||||
/// even if they can't connect to them themselves.
|
||||
///
|
||||
/// 4. Finally, if there's still space available, fill the remaining vector
|
||||
/// space with greylist entries. This is necessary in case this node does
|
||||
/// not support the transports of the requesting node (non-supported
|
||||
/// transports are stored on the greylist).
|
||||
/// space with darklist entries. This is necessary to propagate transports
|
||||
/// that neither this node nor the receiving node support.
|
||||
pub struct ProtocolAddress {
|
||||
channel: ChannelPtr,
|
||||
addrs_sub: MessageSubscription<AddrsMessage>,
|
||||
|
||||
Reference in New Issue
Block a user