diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2022-07-14 22:52:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-14 21:52:26 +0000 |
commit | fe15a865a5a5bc8e89d770e43dae702aa2a809cb (patch) | |
tree | 86a36b867132fd6294cc6358450fe80d506efbca /synapse/state/__init__.py | |
parent | CHANGES.md: fix link to upgrade notes (diff) | |
download | synapse-fe15a865a5a5bc8e89d770e43dae702aa2a809cb.tar.xz |
Rip out auth-event reconciliation code (#12943)
There is a corner in `_check_event_auth` (long known as "the weird corner") where, if we get an event with auth_events which don't match those we were expecting, we attempt to resolve the diffence between our state and the remote's with a state resolution. This isn't specced, and there's general agreement we shouldn't be doing it. However, it turns out that the faster-joins code was relying on it, so we need to introduce something similar (but rather simpler) for that.
Diffstat (limited to 'synapse/state/__init__.py')
-rw-r--r-- | synapse/state/__init__.py | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/synapse/state/__init__.py b/synapse/state/__init__.py index 9f0a36652c..dcd272034d 100644 --- a/synapse/state/__init__.py +++ b/synapse/state/__init__.py @@ -24,7 +24,6 @@ from typing import ( DefaultDict, Dict, FrozenSet, - Iterable, List, Mapping, Optional, @@ -422,31 +421,6 @@ class StateHandler: ) return result - async def resolve_events( - self, - room_version: str, - state_sets: Collection[Iterable[EventBase]], - event: EventBase, - ) -> StateMap[EventBase]: - logger.info( - "Resolving state for %s with %d groups", event.room_id, len(state_sets) - ) - state_set_ids = [ - {(ev.type, ev.state_key): ev.event_id for ev in st} for st in state_sets - ] - - state_map = {ev.event_id: ev for st in state_sets for ev in st} - - new_state = await self._state_resolution_handler.resolve_events_with_store( - event.room_id, - room_version, - state_set_ids, - event_map=state_map, - state_res_store=StateResolutionStore(self.store), - ) - - return {key: state_map[ev_id] for key, ev_id in new_state.items()} - async def update_current_state(self, room_id: str) -> None: """Recalculates the current state for a room, and persists it. |