primitives/types/identifiers/mod.rs
1pub mod faulty_peer;
2pub mod peer_id;
3pub mod protocol_info;
4pub mod session_id;
5
6pub use faulty_peer::FaultyPeer;
7pub use peer_id::PeerId;
8pub use protocol_info::ProtocolInfo;
9pub use session_id::SessionId;
10
11/// Arbitrary numerical identifier for peers running a circuit. Chosen by the circuit
12/// constructor. Allows assymetric behaviour in protocols / circuits.
13///
14/// WARNING: This does not (necessarily) match the `PeerId` ordering!
15pub type PeerNumber = u16;
16
17/// Local numerical identifier for other peers in my cluster. Stems from the lexicographic
18/// ordering of all the peer ids in the network. Used to index arrays containing elements
19/// (e.g., keys) for all other peer numbers in order.
20pub type PeerIndex = usize;