Show the crate…
1 stable release
2.0.0 | Apr 4, 2021 |
---|---|
0.0.0 |
|
#87 in #tetcoin
42 downloads per month
Used in 35 crates
(2 directly)
75KB
1.5K
SLoC
Peer Set Manager (PSM). Contains the strategy for choosing which nodes the network should be connected to.
License: GPL-3.0-or-later WITH Classpath-exception-2.0
lib.rs
:
Peer Set Manager (PSM). Contains the strategy for choosing which nodes the network should be connected to.
The PSM handles sets of nodes. A set of nodes is defined as the nodes that are believed to support a certain capability, such as handling blocks and transactions of a specific chain, or collating a certain parachain.
For each node in each set, the peerset holds a flag specifying whether the node is connected to us or not.
This connected/disconnected status is specific to the node and set combination, and it is for example possible for a node to be connected through a specific set but not another.
In addition, for each, set, the peerset also holds a list of reserved nodes towards which it will at all time try to maintain a connection with.
Dependencies
~13–20MB
~373K SLoC