LES Peer Info (#4195)
* connected peers function for network service * get LES peer info in sync API * new peer info in RPC
This commit is contained in:
committed by
Arkadiy Paronyan
parent
35666f718b
commit
3ff9324ec0
@@ -316,6 +316,12 @@ impl LightProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
/// Attempt to get peer status.
|
||||
pub fn peer_status(&self, peer: &PeerId) -> Option<Status> {
|
||||
self.peers.read().get(&peer)
|
||||
.map(|peer| peer.lock().status.clone())
|
||||
}
|
||||
|
||||
/// Check the maximum amount of requests of a specific type
|
||||
/// which a peer would be able to serve. Returns zero if the
|
||||
/// peer is unknown or has no buffer flow parameters.
|
||||
|
||||
Reference in New Issue
Block a user