aboutsummaryrefslogtreecommitdiffstats
path: root/src/api
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-02 16:42:25 +0100
committertv <tv@krebsco.de>2026-11-02 16:42:25 +0100
commit810bf840d6318ecfab0709989067421925f12504 (patch)
tree6a884c74065f9e876ff4a87fc7c88eee71d3bb6b /src/api
parentb922d055a2208f5610c704a04309b14e1cbceb05 (diff)
add per-node traffic counts
Diffstat (limited to 'src/api')
-rw-r--r--src/api/peers.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/api/peers.rs b/src/api/peers.rs
index 3fe4c39..537ad98 100644
--- a/src/api/peers.rs
+++ b/src/api/peers.rs
@@ -121,7 +121,9 @@ pub(crate) async fn peer_list(state: &AppState) -> PeerListResponse {
for (peer, peer_state_mutex) in snapshot {
let neighbour = crate::swarm::topology::is_neighbour(&state, &peer);
- let traffic = state.traffic.peer(&peer).unwrap_or_default();
+ let traffic = state
+ .traffic
+ .node(&peer, &state.transport.identities_of(&peer));
let sync_throughput = state
.throughput
.lock_or_recover()