[][src]Struct libp2p_gossipsub::PeerScoreThresholds

pub struct PeerScoreThresholds {
    pub gossip_threshold: f64,
    pub publish_threshold: f64,
    pub graylist_threshold: f64,
    pub accept_px_threshold: f64,
    pub opportunistic_graft_threshold: f64,
}

Fields

gossip_threshold: f64

The score threshold below which gossip propagation is suppressed; should be negative.

publish_threshold: f64

The score threshold below which we shouldn't publish when using flood publishing (also applies to fanout peers); should be negative and <= gossip_threshold.

graylist_threshold: f64

The score threshold below which message processing is suppressed altogether, implementing an effective graylist according to peer score; should be negative and <= publish_threshold.

accept_px_threshold: f64

The score threshold below which px will be ignored; this should be positive and limited to scores attainable by bootstrappers and other trusted nodes.

opportunistic_graft_threshold: f64

The median mesh score threshold before triggering opportunistic grafting; this should have a small positive value.

Implementations

impl PeerScoreThresholds[src]

pub fn validate(&self) -> Result<(), &'static str>[src]

Trait Implementations

impl Clone for PeerScoreThresholds[src]

impl Debug for PeerScoreThresholds[src]

impl Default for PeerScoreThresholds[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> From<T> 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>,