[][src]Struct grin_p2p::types::P2PConfig

pub struct P2PConfig {
    pub host: IpAddr,
    pub port: u16,
    pub seeding_type: Seeding,
    pub seeds: Option<PeerAddrs>,
    pub capabilities: Capabilities,
    pub peers_allow: Option<PeerAddrs>,
    pub peers_deny: Option<PeerAddrs>,
    pub peers_preferred: Option<PeerAddrs>,
    pub ban_window: Option<i64>,
    pub peer_max_inbound_count: Option<u32>,
    pub peer_max_outbound_count: Option<u32>,
    pub peer_min_preferred_outbound_count: Option<u32>,
    pub peer_listener_buffer_count: Option<u32>,
    pub dandelion_peer: Option<PeerAddr>,
}

Configuration for the peer-to-peer server.

Fields

host: IpAddrport: u16seeding_type: Seeding

Method used to get the list of seed nodes for initial bootstrap.

seeds: Option<PeerAddrs>

The list of seed nodes, if using Seeding as a seed type

capabilities: Capabilities

Capabilities expose by this node, also conditions which other peers this node will have an affinity toward when connection.

peers_allow: Option<PeerAddrs>peers_deny: Option<PeerAddrs>peers_preferred: Option<PeerAddrs>

The list of preferred peers that we will try to connect to

ban_window: Option<i64>peer_max_inbound_count: Option<u32>peer_max_outbound_count: Option<u32>peer_min_preferred_outbound_count: Option<u32>peer_listener_buffer_count: Option<u32>dandelion_peer: Option<PeerAddr>

Methods

impl P2PConfig[src]

Note certain fields are options just so they don't have to be included in grin-server.toml, but we don't want them to ever return none

pub fn ban_window(&self) -> i64[src]

return ban window

pub fn peer_max_inbound_count(&self) -> u32[src]

return maximum inbound peer connections count

pub fn peer_max_outbound_count(&self) -> u32[src]

return maximum outbound peer connections count

pub fn peer_min_preferred_outbound_count(&self) -> u32[src]

return minimum preferred outbound peer count

pub fn peer_listener_buffer_count(&self) -> u32[src]

return peer buffer count for listener

Trait Implementations

impl Clone for P2PConfig[src]

impl Debug for P2PConfig[src]

impl Default for P2PConfig[src]

Default address for peer-to-peer connections.

impl<'de> Deserialize<'de> for P2PConfig[src]

impl PartialEq<P2PConfig> for P2PConfig[src]

impl Serialize for P2PConfig[src]

impl StructuralPartialEq for P2PConfig[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> CloneAny for T where
    T: Clone + Any

impl<T> DebugAny for T where
    T: Any + Debug

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Erased for T

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

impl<T, U> Into<U> for T where
    U: From<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<T> UnsafeAny for T where
    T: Any

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