From 40919b51be424451a8c7714ec3f60690aeb801d5 Mon Sep 17 00:00:00 2001 From: meejah Date: Fri, 12 Feb 2021 01:09:39 -0700 Subject: [PATCH] count bytes missing --- src/wormhole_transit_relay/server_state.py | 2 +- src/wormhole_transit_relay/test/test_transit_server.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wormhole_transit_relay/server_state.py b/src/wormhole_transit_relay/server_state.py index 7cdcb70..690b2c5 100644 --- a/src/wormhole_transit_relay/server_state.py +++ b/src/wormhole_transit_relay/server_state.py @@ -519,7 +519,7 @@ class TransitServerState(object): relaying.upon( got_bytes, enter=relaying, - outputs=[_send_to_partner], + outputs=[_count_bytes, _send_to_partner], ) relaying.upon( connection_lost, diff --git a/src/wormhole_transit_relay/test/test_transit_server.py b/src/wormhole_transit_relay/test/test_transit_server.py index a4f2f94..09615c7 100644 --- a/src/wormhole_transit_relay/test/test_transit_server.py +++ b/src/wormhole_transit_relay/test/test_transit_server.py @@ -415,7 +415,7 @@ class Usage(ServerBase, unittest.TestCase): self.assertEqual(len(self._usage), 1, self._usage) self.assertEqual(self._usage[0]["mood"], "happy", self._usage) self.assertEqual(self._usage[0]["total_bytes"], 20) - self.assertNotIdentical(waiting_time, None) + self.assertNotIdentical(self._usage[0]["waiting_time"], None) def test_redundant(self): p1a = self.new_protocol()