diff options
author | Richard van der Hoff <github@rvanderhoff.org.uk> | 2018-02-02 15:27:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-02 15:27:35 +0100 |
commit | 18eae413af4be35b0bc3b894b16b1feaf86d1ea4 (patch) | |
tree | 6298a97d17a4f604047d706309606aee27e1f7d1 /synapse/handlers/federation.py | |
parent | Merge pull request #2841 from matrix-org/rav/refactor_calc_state_delta (diff) | |
parent | Factor out resolve_state_groups to a separate handler (diff) | |
download | synapse-18eae413af4be35b0bc3b894b16b1feaf86d1ea4.tar.xz |
Merge pull request #2842 from matrix-org/rav/state_resolution_handler
Factor out resolve_state_groups to a separate handler
Diffstat (limited to 'synapse/handlers/federation.py')
-rw-r--r-- | synapse/handlers/federation.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 677532c87b..8ee9434c9b 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -808,13 +808,12 @@ class FederationHandler(BaseHandler): event_ids = list(extremities.keys()) logger.debug("calling resolve_state_groups in _maybe_backfill") + resolve = logcontext.preserve_fn( + self.state_handler.resolve_state_groups_for_events + ) states = yield logcontext.make_deferred_yieldable(defer.gatherResults( - [ - logcontext.preserve_fn(self.state_handler.resolve_state_groups)( - room_id, [e] - ) - for e in event_ids - ], consumeErrors=True, + [resolve(room_id, [e]) for e in event_ids], + consumeErrors=True, )) states = dict(zip(event_ids, [s.state for s in states])) |