summary refs log tree commit diff
path: root/synapse/state/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-10-24 09:44:22 +0100
committerErik Johnston <erik@matrix.org>2018-10-24 09:44:22 +0100
commit810715f79aafc586e70e9dcd3da4a2cc6823f704 (patch)
tree73357359f52508df508c0a2436114691a61df339 /synapse/state/__init__.py
parentUpdate event_auth table for rejected events (diff)
downloadsynapse-810715f79aafc586e70e9dcd3da4a2cc6823f704.tar.xz
Rename resolve_events_with_factory
Diffstat (limited to 'synapse/state/__init__.py')
-rw-r--r--synapse/state/__init__.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/synapse/state/__init__.py b/synapse/state/__init__.py
index 836e137296..9b40b18d5b 100644
--- a/synapse/state/__init__.py
+++ b/synapse/state/__init__.py
@@ -394,7 +394,7 @@ class StateHandler(object):
         }
 
         with Measure(self.clock, "state._resolve_events"):
-            new_state = yield resolve_events_with_factory(
+            new_state = yield resolve_events_with_store(
                 room_version, state_set_ids,
                 event_map=state_map,
                 state_res_store=StateResolutionStore(self.store),
@@ -478,10 +478,10 @@ class StateResolutionHandler(object):
 
             # start by assuming we won't have any conflicted state, and build up the new
             # state map by iterating through the state groups. If we discover a conflict,
-            # we give up and instead use `resolve_events_with_factory`.
+            # we give up and instead use `resolve_events_with_store`.
             #
             # XXX: is this actually worthwhile, or should we just let
-            # resolve_events_with_factory do it?
+            # resolve_events_with_store do it?
             new_state = {}
             conflicted_state = False
             for st in itervalues(state_groups_ids):
@@ -496,7 +496,7 @@ class StateResolutionHandler(object):
             if conflicted_state:
                 logger.info("Resolving conflicted state for %r", room_id)
                 with Measure(self.clock, "state._resolve_events"):
-                    new_state = yield resolve_events_with_factory(
+                    new_state = yield resolve_events_with_store(
                         room_version,
                         list(itervalues(state_groups_ids)),
                         event_map=event_map,
@@ -581,7 +581,7 @@ def _make_state_cache_entry(
     )
 
 
-def resolve_events_with_factory(room_version, state_sets, event_map, state_res_store):
+def resolve_events_with_store(room_version, state_sets, event_map, state_res_store):
     """
     Args:
         room_version(str): Version of the room
@@ -604,11 +604,11 @@ def resolve_events_with_factory(room_version, state_sets, event_map, state_res_s
             a map from (type, state_key) to event_id.
     """
     if room_version == RoomVersions.V1:
-        return v1.resolve_events_with_factory(
+        return v1.resolve_events_with_store(
             state_sets, event_map, state_res_store.get_events,
         )
     elif room_version == RoomVersions.VDH_TEST:
-        return v2.resolve_events_with_factory(
+        return v2.resolve_events_with_store(
             state_sets, event_map, state_res_store,
         )
     else: