refactor attachment

This commit is contained in:
John Smith
2022-12-26 16:33:48 -05:00
parent 525baea32c
commit f49e4f0892
11 changed files with 402 additions and 239 deletions

View File

@@ -51,7 +51,7 @@ pub struct LowLevelPortInfo {
pub type RoutingTableEntryFilter<'t> =
Box<dyn FnMut(&RoutingTableInner, DHTKey, Option<Arc<BucketEntry>>) -> bool + Send + 't>;
#[derive(Clone, Debug, Default)]
#[derive(Clone, Debug, Default, Eq, PartialEq)]
pub struct RoutingTableHealth {
/// Number of reliable (responsive) entries in the routing table
pub reliable_entry_count: usize,
@@ -60,9 +60,9 @@ pub struct RoutingTableHealth {
/// Number of dead (always unresponsive) entries in the routing table
pub dead_entry_count: usize,
/// If PublicInternet network class is valid yet
pub public_internet_network_class_valid: bool, xxx do this and add to attachment calculation
pub public_internet_ready: bool,
/// If LocalNetwork network class is valid yet
pub local_network_network_class_valid: bool,
pub local_network_ready: bool,
}
pub(super) struct RoutingTableUnlockedInner {
@@ -78,7 +78,7 @@ pub(super) struct RoutingTableUnlockedInner {
kick_queue: Mutex<BTreeSet<usize>>,
/// Background process for computing statistics
rolling_transfers_task: TickTask<EyreReport>,
/// Backgroup process to purge dead routing table entries when necessary
/// Background process to purge dead routing table entries when necessary
kick_buckets_task: TickTask<EyreReport>,
/// Background process to get our initial routing table
bootstrap_task: TickTask<EyreReport>,