mirror of
https://github.com/0glabs/0g-storage-node.git
synced 2024-12-23 23:05:17 +00:00
add incoming stats for discv5
This commit is contained in:
parent
43ba0b3079
commit
5b3946c363
@ -140,7 +140,12 @@ impl RouterService {
|
||||
.filter(|n| n.2.is_connected())
|
||||
.count();
|
||||
let disconnected_nodes = discovered_nodes.len() - connected_nodes;
|
||||
debug!(%connected_nodes, %disconnected_nodes, "qbit - network statistics for discv5");
|
||||
let incoming_nodes = discovered_nodes
|
||||
.iter()
|
||||
.filter(|n| n.2.is_incoming())
|
||||
.count();
|
||||
let outgoing_nodes = discovered_nodes.len() - incoming_nodes;
|
||||
debug!(%connected_nodes, %disconnected_nodes, %incoming_nodes, %outgoing_nodes, "qbit - network statistics for discv5");
|
||||
|
||||
let gossip = self.libp2p.swarm.behaviour().gs();
|
||||
let all_peers = gossip.all_peers().count();
|
||||
|
Loading…
Reference in New Issue
Block a user