Struct sc_peerset::SetConfig

source ·
pub struct SetConfig {
    pub in_peers: u32,
    pub out_peers: u32,
    pub bootnodes: Vec<PeerId>,
    pub reserved_nodes: HashSet<PeerId>,
    pub reserved_only: bool,
}
Expand description

Configuration for a single set of nodes.

Fields§

§in_peers: u32

Maximum number of ingoing links to peers.

§out_peers: u32

Maximum number of outgoing links to peers.

§bootnodes: Vec<PeerId>

List of bootstrap nodes to initialize the set with.

Note: Keep in mind that the networking has to know an address for these nodes, otherwise it will not be able to connect to them.

§reserved_nodes: HashSet<PeerId>

Lists of nodes we should always be connected to.

Note: Keep in mind that the networking has to know an address for these nodes, otherwise it will not be able to connect to them.

§reserved_only: bool

If true, we only accept nodes in SetConfig::reserved_nodes.

Trait Implementations§

Formats the value using the given formatter. 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
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.