summary refs log tree commit diff
path: root/synapse/crypto/keyring.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-05-19 10:23:02 +0100
committerMark Haines <mark.haines@matrix.org>2015-05-19 10:23:02 +0100
commitc6a03c46e644061155587c141e75f44dc028ed75 (patch)
tree84de6e73b369b986cf35cf4d436009636c0adbdf /synapse/crypto/keyring.py
parentMerge pull request #152 from matrix-org/notifier_performance (diff)
downloadsynapse-c6a03c46e644061155587c141e75f44dc028ed75.tar.xz
SYN-383: Extract the response list from 'server_keys' in the response JSON as it might work better than iterating over the top level dict
Diffstat (limited to 'synapse/crypto/keyring.py')
-rw-r--r--synapse/crypto/keyring.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/crypto/keyring.py b/synapse/crypto/keyring.py
index a859872ce2..c7e47f6bf9 100644
--- a/synapse/crypto/keyring.py
+++ b/synapse/crypto/keyring.py
@@ -188,7 +188,7 @@ class Keyring(object):
             # TODO(mark): Set the minimum_valid_until_ts to that needed by
             # the events being validated or the current time if validating
             # an incoming request.
-            responses = yield self.client.post_json(
+            query_response = yield self.client.post_json(
                 destination=perspective_name,
                 path=b"/_matrix/key/v2/query",
                 data={
@@ -204,6 +204,8 @@ class Keyring(object):
 
         keys = {}
 
+        responses = query_response["server_keys"]
+
         for response in responses:
             if (u"signatures" not in response
                     or perspective_name not in response[u"signatures"]):