From 4669619f7e18d4c49746331c90c4f8586adab86b Mon Sep 17 00:00:00 2001 From: meejah Date: Fri, 12 Feb 2021 01:09:16 -0700 Subject: [PATCH] skip usage-counting if we're jilted but other side is happy? --- src/wormhole_transit_relay/server_state.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wormhole_transit_relay/server_state.py b/src/wormhole_transit_relay/server_state.py index 31458b2..7cdcb70 100644 --- a/src/wormhole_transit_relay/server_state.py +++ b/src/wormhole_transit_relay/server_state.py @@ -362,6 +362,10 @@ class TransitServerState(object): # some outputs to record "usage" information .. @_machine.output() def _record_usage(self): + if self._mood == "jilted": + if self._buddy: + if self._buddy._mood == "happy": + return self._usage.record( started=self._client.started_time, buddy_started=self._buddy._client.started_time if self._buddy is not None else None,