summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-05-03 10:06:43 +0100
committerErik Johnston <erik@matrix.org>2017-05-03 10:06:43 +0100
commitef862186dd6b04210a536cbe3126e018260f8467 (patch)
treea6e807042a5697a7d3e6a09a69a805d8b05b0fa0
parentFixup (diff)
downloadsynapse-ef862186dd6b04210a536cbe3126e018260f8467.tar.xz
Merge together redundant calculations/logging
-rw-r--r--synapse/handlers/federation.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index be2ea0cd56..2af9849ed0 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -175,14 +175,9 @@ class FederationHandler(BaseHandler):
                         # Update the set of things we've seen after trying to
                         # fetch the missing stuff
                         have_seen = yield self.store.have_events(prevs)
-
                         seen = set(have_seen.iterkeys())
-                        if prevs - seen:
-                            logger.info(
-                                "Still missing %d prev events for %s: %r...",
-                                len(prevs - seen), pdu.event_id, list(prevs - seen)[:5]
-                            )
-                        else:
+
+                        if not prevs - seen:
                             logger.info(
                                 "Found all missing prev events for %s", pdu.event_id
                             )
@@ -193,8 +188,6 @@ class FederationHandler(BaseHandler):
                         list(prevs - seen)[:5],
                     )
 
-            prevs = {e_id for e_id, _ in pdu.prev_events}
-            seen = set(have_seen.keys())
             if prevs - seen:
                 logger.info(
                     "Still missing %d events for room %r: %r...",