Improvements to system_networkState (#2088)

This commit is contained in:
Pierre Krieger
2019-03-26 14:45:11 +01:00
committed by Gav Wood
parent da124d74d1
commit a9420424b2
7 changed files with 49 additions and 23 deletions
@@ -129,6 +129,11 @@ impl<TMessage, TSubstream> Behaviour<TMessage, TSubstream> {
pub fn drop_node(&mut self, peer_id: &PeerId) {
self.custom_protocols.disconnect_peer(peer_id)
}
/// Returns the state of the peerset manager, for debugging purposes.
pub fn peerset_debug_info(&self) -> serde_json::Value {
self.custom_protocols.peerset_debug_info()
}
}
/// Event that can be emitted by the behaviour.