Struct libp2p::gossipsub::PeerScoreThresholds[][src]

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

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.