Struct tari_comms_dht::NetworkDiscoveryConfig[][src]

pub struct NetworkDiscoveryConfig {
    pub enabled: bool,
    pub min_desired_peers: usize,
    pub idle_period: Duration,
    pub idle_after_num_rounds: usize,
    pub on_failure_idle_period: Duration,
    pub max_sync_peers: usize,
}

Fields

enabled: bool

True to enable network discovery, false to disable it. Default: true

min_desired_peers: usize

A threshold for the minimum number of peers this node should ideally be aware of. If below this threshold a more "aggressive" strategy is employed. Default: 50

idle_period: Duration

The period to wait once the number of rounds given by idle_after_num_rounds has completed. Default: 30 mins

idle_after_num_rounds: usize

The minimum number of network discovery rounds to perform before idling (going to sleep). If there are less than min_desired_peers then the actual number of rounds performed will exceed this value. Default: 10

on_failure_idle_period: Duration

Time to idle after a failed round. Default: 5 secs

max_sync_peers: usize

The maximum number of sync peer to select for each round. The selection strategy varies depending on the current state. Default: 5

Trait Implementations

impl Clone for NetworkDiscoveryConfig[src]

impl Copy for NetworkDiscoveryConfig[src]

impl Debug for NetworkDiscoveryConfig[src]

impl Default for NetworkDiscoveryConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> Cast<U> for T where
    U: FromCast<T>, 

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized

impl<'a, T> DefaultFeatures<'a> for T where
    T: 'a + Clone + Send + Sync

impl<T> From<T> for T[src]

impl<T> FromBits<T> for T

impl<T> FromCast<T> for T

impl<T> InitializableFromZeroed for T where
    T: Default

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> IntoBits<U> for T where
    U: FromBits<T>, 

impl<T> IntoSql for T[src]

impl<'a, T> NonSyncFeatures<'a> for T where
    T: 'a + Clone

impl<T> SafeBorrow<T> for T where
    T: ?Sized

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,