diff options
author | Mark Haines <mjark@negativecurvature.net> | 2015-09-28 14:22:44 +0100 |
---|---|---|
committer | Mark Haines <mjark@negativecurvature.net> | 2015-09-28 14:22:44 +0100 |
commit | 301141515a75f6925ff458a7de1d84bf7b3960e8 (patch) | |
tree | d5aeeadd630bdd8559f320be7c90742f75def41b /synapse/handlers/federation.py | |
parent | Merge pull request #290 from matrix-org/daniel/synctl (diff) | |
parent | Fix scripts-dev/definitions.py argparse options (diff) | |
download | synapse-301141515a75f6925ff458a7de1d84bf7b3960e8.tar.xz |
Merge pull request #288 from matrix-org/markjh/unused_definitions
Remove some of the unused definitions from synapse
Diffstat (limited to 'synapse/handlers/federation.py')
-rw-r--r-- | synapse/handlers/federation.py | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 4ff20599d6..f4dce712f9 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -1456,52 +1456,3 @@ class FederationHandler(BaseHandler): }, "missing": [e.event_id for e in missing_locals], }) - - @defer.inlineCallbacks - def _handle_auth_events(self, origin, auth_events): - auth_ids_to_deferred = {} - - def process_auth_ev(ev): - auth_ids = [e_id for e_id, _ in ev.auth_events] - - prev_ds = [ - auth_ids_to_deferred[i] - for i in auth_ids - if i in auth_ids_to_deferred - ] - - d = defer.Deferred() - - auth_ids_to_deferred[ev.event_id] = d - - @defer.inlineCallbacks - def f(*_): - ev.internal_metadata.outlier = True - - try: - auth = { - (e.type, e.state_key): e for e in auth_events - if e.event_id in auth_ids - } - - yield self._handle_new_event( - origin, ev, auth_events=auth - ) - except: - logger.exception( - "Failed to handle auth event %s", - ev.event_id, - ) - - d.callback(None) - - if prev_ds: - dx = defer.DeferredList(prev_ds) - dx.addBoth(f) - else: - f() - - for e in auth_events: - process_auth_ev(e) - - yield defer.DeferredList(auth_ids_to_deferred.values()) |