[][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.


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>


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

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

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

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.

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

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

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

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

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> Same<T> for T

type Output = T

Should always be Self

impl<T> Erased for T

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

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

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

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