Remove support for multiple network protocols (#2005)

* Remove support multiple network protocols

* Address concerns

* Add back debug_asserts
This commit is contained in:
Pierre Krieger
2019-03-19 11:56:56 +01:00
committed by GitHub
parent 57387ef585
commit 002143d0a2
11 changed files with 452 additions and 733 deletions
+3 -2
View File
@@ -134,8 +134,9 @@ pub struct NetworkStatePeer {
/// If true, the peer is "enabled", which means that we try to open Substrate-related protocols
/// with this peer. If false, we stick to Kademlia and/or other network-only protocols.
pub enabled: bool,
/// List of protocols that we have open with the given peer.
pub open_protocols: HashSet<ProtocolId>,
/// If true, the peer is "open", which means that we have a Substrate-related protocol
/// with this peer.
pub open: bool,
/// List of addresses known for this node, with its reputation score.
pub known_addresses: HashMap<Multiaddr, u32>,
}