summary refs log tree commit diff
path: root/synapse/federation
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/federation')
-rw-r--r--synapse/federation/federation_client.py7
-rw-r--r--synapse/federation/federation_server.py12
2 files changed, 7 insertions, 12 deletions
diff --git a/synapse/federation/federation_client.py b/synapse/federation/federation_client.py
index 1173ca817b..e1539bd0e0 100644
--- a/synapse/federation/federation_client.py
+++ b/synapse/federation/federation_client.py
@@ -357,15 +357,10 @@ class FederationClient(object):
             for e in content["auth_chain"]
         ]
 
-        missing = [
-            (yield self._check_sigs_and_hash(self.event_from_pdu_json(e)))
-            for e in content.get("missing", [])
-        ]
-
         ret = {
             "auth_chain": auth_chain,
             "rejects": content.get("rejects", []),
-            "missing": missing,
+            "missing": content.get("missing", []),
         }
 
         defer.returnValue(ret)
diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py
index 845a07a3a3..84ed0a0ba0 100644
--- a/synapse/federation/federation_server.py
+++ b/synapse/federation/federation_server.py
@@ -252,11 +252,8 @@ class FederationServer(object):
                 e.get_pdu_json(time_now)
                 for e in ret["auth_chain"]
             ],
-            "rejects": content.get("rejects", []),
-            "missing": [
-                e.get_pdu_json(time_now)
-                for e in ret.get("missing", [])
-            ],
+            "rejects": ret.get("rejects", []),
+            "missing": ret.get("missing", []),
         }
 
         defer.returnValue(
@@ -372,7 +369,10 @@ class FederationServer(object):
                             logger.exception("Failed to get PDU")
                             fetch_state = True
             else:
-                fetch_state = True
+                prevs = {e_id for e_id, _ in pdu.prev_events}
+                seen = set(have_seen.keys())
+                if prevs - seen:
+                    fetch_state = True
         else:
             fetch_state = True