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

pub struct P2PConfig {
    pub host: IpAddr,
    pub port: u16,
    pub seeding_type: Seeding,
    pub seeds: Option<Vec<PeerAddr>>,
    pub capabilities: Capabilities,
    pub peers_allow: Option<Vec<PeerAddr>>,
    pub peers_deny: Option<Vec<PeerAddr>>,
    pub peers_preferred: Option<Vec<PeerAddr>>,
    pub ban_window: Option<i64>,
    pub peer_max_count: Option<u32>,
    pub peer_min_preferred_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<Vec<PeerAddr>>

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<Vec<PeerAddr>>peers_deny: Option<Vec<PeerAddr>>peers_preferred: Option<Vec<PeerAddr>>

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

ban_window: Option<i64>peer_max_count: Option<u32>peer_min_preferred_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_count(&self) -> u32[src]

return peer_max_count

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

return peer_preferred_count

Trait Implementations

impl PartialEq<P2PConfig> for P2PConfig[src]

impl Default for P2PConfig[src]

Default address for peer-to-peer connections.

impl Clone for P2PConfig[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for P2PConfig[src]

impl Serialize for P2PConfig[src]

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

Auto Trait Implementations

impl Send for P2PConfig

impl Sync for P2PConfig

Blanket Implementations

impl<T> From for T[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> UnsafeAny for T where
    T: Any

impl<T> Erased for T

impl<T> Same for T

type Output = T

Should always be Self

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

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

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