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
+7
View File
@@ -23,6 +23,8 @@ use libp2p::PeerId;
use parking_lot::Mutex;
use std::sync::Arc;
pub use serde_json::Value;
/// Shared part of the peer set manager (PSM). Distributed around the code.
pub struct Peerset {
tx: mpsc::UnboundedSender<Message>,
@@ -297,6 +299,11 @@ impl PeersetMut {
}
alloc_slots(&mut inner, &self.parent.tx);
}
/// Produces a JSON object containing the state of the peerset manager, for debugging purposes.
pub fn debug_info(&self) -> serde_json::Value {
serde_json::Value::Null
}
}
impl Stream for PeersetMut {