diff options
author | Erik Johnston <erik@matrix.org> | 2020-12-18 15:00:34 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-18 15:00:34 +0000 |
commit | 5e7d75daa2d53ea74c75f9a0db52c5590fc22038 (patch) | |
tree | 8f2a75480a30fc23283c6c3ebe6d5b4c2426cf67 /synapse/state | |
parent | Implement a username picker for synapse (#8942) (diff) | |
download | synapse-5e7d75daa2d53ea74c75f9a0db52c5590fc22038.tar.xz |
Fix mainline ordering in state res v2 (#8971)
This had two effects 1) it'd give the wrong answer and b) would iterate *all* power levels in the auth chain of each event. The latter of which can be *very* expensive for certain types of IRC bridge rooms that have large numbers of power level changes.
Diffstat (limited to 'synapse/state')
-rw-r--r-- | synapse/state/v2.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/state/v2.py b/synapse/state/v2.py index f85124bf81..e585954bd8 100644 --- a/synapse/state/v2.py +++ b/synapse/state/v2.py @@ -658,7 +658,7 @@ async def _get_mainline_depth_for_event( # We do an iterative search, replacing `event with the power level in its # auth events (if any) while tmp_event: - depth = mainline_map.get(event.event_id) + depth = mainline_map.get(tmp_event.event_id) if depth is not None: return depth |