store.py: get_node_traffic should not count incoming traffic

to match behavior of get_top_traffic_nodes
This commit is contained in:
prokrypt
2025-03-26 14:30:20 -07:00
committed by GitHub
parent fd99067ea5
commit 12c29c3e49

View File

@@ -247,7 +247,7 @@ async def get_node_traffic(node_id: int):
node.long_name, packet.portnum,
COUNT(*) AS packet_count
FROM packet
JOIN node ON packet.from_node_id = node.node_id OR packet.to_node_id = node.node_id
JOIN node ON packet.from_node_id = node.node_id
WHERE node.node_id = :node_id
AND packet.import_time >= DATETIME('now', 'localtime', '-1 day')
GROUP BY packet.portnum