summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-03-24 13:15:41 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-03-24 13:15:41 +0000
commit8fbacc7c545b51ca086d14fb571c7acf8a598d30 (patch)
tree71a475742e61146b05d04386ee211def2b6e4a0b /tests
parent1.11.0rc1 (diff)
parentReduce auth chains fetched during v2 state res. (#6952) (diff)
downloadsynapse-8fbacc7c545b51ca086d14fb571c7acf8a598d30.tar.xz
Reduce auth chains fetched during v2 state res. (#6952)
* commit '2b37eabca':
  Reduce auth chains fetched during v2 state res. (#6952)
  update changes.md
Diffstat (limited to 'tests')
-rw-r--r--tests/state/test_v2.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/state/test_v2.py b/tests/state/test_v2.py

index 5bafad9f19..5059ade850 100644 --- a/tests/state/test_v2.py +++ b/tests/state/test_v2.py
@@ -603,7 +603,7 @@ class TestStateResolutionStore(object): return {eid: self.event_map[eid] for eid in event_ids if eid in self.event_map} - def get_auth_chain(self, event_ids): + def get_auth_chain(self, event_ids, ignore_events): """Gets the full auth chain for a set of events (including rejected events). @@ -617,6 +617,8 @@ class TestStateResolutionStore(object): Args: event_ids (list): The event IDs of the events to fetch the auth chain for. Must be state events. + ignore_events: Set of events to exclude from the returned auth + chain. Returns: Deferred[list[str]]: List of event IDs of the auth chain. @@ -627,7 +629,7 @@ class TestStateResolutionStore(object): stack = list(event_ids) while stack: event_id = stack.pop() - if event_id in result: + if event_id in result or event_id in ignore_events: continue result.add(event_id)