summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <1342360+anoadragon453@users.noreply.github.com>2021-02-12 22:15:50 +0000
committerGitHub <noreply@github.com>2021-02-12 22:15:50 +0000
commit594f2853e0da9535ea958bda4c9041db4af85d9e (patch)
treefc91fb57656e44fdddefb4ecc3f8382090f0d6dc
parentFix some typos. (diff)
downloadsynapse-594f2853e0da9535ea958bda4c9041db4af85d9e.tar.xz
Remove dead handled_events set in invite_join (#9394)
This PR removes a set that was created and [initially used](https://github.com/matrix-org/synapse/commit/1d2a0040cff8d04cdc7d7d09d8f04a5d628fa9dd#diff-0bc92da3d703202f5b9be2d3f845e375f5b1a6bc6ba61705a8af9be1121f5e42R435-R436), but is no longer today.

May help cut down a bit on the time it takes to accept invites.
-rw-r--r--changelog.d/9394.misc1
-rw-r--r--synapse/handlers/federation.py6
2 files changed, 1 insertions, 6 deletions
diff --git a/changelog.d/9394.misc b/changelog.d/9394.misc
new file mode 100644
index 0000000000..b3e90143cc
--- /dev/null
+++ b/changelog.d/9394.misc
@@ -0,0 +1 @@
+Remove some dead code from the acceptance of room invites path.
\ No newline at end of file
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index eddc7582d0..5581e06bb4 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -1354,8 +1354,6 @@ class FederationHandler(BaseHandler):
 
         await self._clean_room_for_join(room_id)
 
-        handled_events = set()
-
         try:
             # Try the host we successfully got a response to /make_join/
             # request first.
@@ -1375,10 +1373,6 @@ class FederationHandler(BaseHandler):
             auth_chain = ret["auth_chain"]
             auth_chain.sort(key=lambda e: e.depth)
 
-            handled_events.update([s.event_id for s in state])
-            handled_events.update([a.event_id for a in auth_chain])
-            handled_events.add(event.event_id)
-
             logger.debug("do_invite_join auth_chain: %s", auth_chain)
             logger.debug("do_invite_join state: %s", state)