diff options
| author | tv <tv@krebsco.de> | 2026-11-02 16:42:25 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-02 16:42:25 +0100 |
| commit | 857b7766985cb4d60ba3b5797d3a8cb43f6a53bb (patch) | |
| tree | 6c7ed6833253a30beb55dbb067291a0efae409fd /src/api/peers.rs | |
| parent | 29cad923a5e2d7dc3207c8d456440f8c37bfd7b6 (diff) | |
add per-node traffic counts
Diffstat (limited to 'src/api/peers.rs')
| -rw-r--r-- | src/api/peers.rs | 4 |
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() |
