[][src]Struct zebra_network::Config

pub struct Config {
    pub listen_addr: SocketAddr,
    pub network: Network,
    pub user_agent: String,
    pub initial_mainnet_peers: HashSet<String>,
    pub initial_testnet_peers: HashSet<String>,
    pub peerset_request_buffer_size: usize,
    pub peerset_initial_target_size: usize,
    pub ewma_default_rtt: Duration,
    pub ewma_decay_time: Duration,
    pub handshake_timeout: Duration,
    pub new_peer_interval: Duration,
}

Configuration for networking code.

Fields

listen_addr: SocketAddr

The address on which this node should listen for connections.

network: Network

The network to connect to.

user_agent: String

The user-agent to advertise.

initial_mainnet_peers: HashSet<String>

A list of initial peers for the peerset when operating on mainnet.

initial_testnet_peers: HashSet<String>

A list of initial peers for the peerset when operating on testnet.

peerset_request_buffer_size: usize

The outgoing request buffer size for the peer set.

peerset_initial_target_size: usize

The initial target size for the peer set.

ewma_default_rtt: Duration

The default RTT estimate for peer responses, used in load-balancing.

ewma_decay_time: Duration

The decay time for the exponentially-weighted moving average response time.

handshake_timeout: Duration

The timeout for peer handshakes.

new_peer_interval: Duration

How frequently we attempt to connect to a new peer.

Implementations

impl Config[src]

pub fn initial_peers(&self) -> HashSet<SocketAddr>[src]

Get the initial seed peers based on the configured network.

Trait Implementations

impl Clone for Config[src]

impl Debug for Config[src]

impl Default for Config[src]

impl<'de> Deserialize<'de> for Config where
    Config: Default
[src]

impl Serialize for Config[src]

Auto Trait Implementations

impl RefUnwindSafe for Config

impl Send for Config

impl Sync for Config

impl Unpin for Config

impl UnwindSafe for Config

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

impl<T> Instrument for T[src]

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

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>, 

impl<T> WithSubscriber for T[src]