mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:36:06 -04:00
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.
This commit is contained in:
parent
28877fade9
commit
5e7d75daa2
3 changed files with 58 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue