summary refs log tree commit diff
path: root/synapse/storage/pdu.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-10-17 11:40:35 +0100
committerMark Haines <mark.haines@matrix.org>2014-10-17 11:40:35 +0100
commitc8f996e29ffd7055bc6521ea610fc12ff50502e5 (patch)
treeff3dabd4839af6902336ec4314270d1f55051eb6 /synapse/storage/pdu.py
parentInclude hashes of previous pdus when referencing them (diff)
downloadsynapse-c8f996e29ffd7055bc6521ea610fc12ff50502e5.tar.xz
Hash the same content covered by the signature when referencing previous PDUs rather than reusing the PDU content hashes
Diffstat (limited to 'synapse/storage/pdu.py')
-rw-r--r--synapse/storage/pdu.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/pdu.py b/synapse/storage/pdu.py
index a423b42dbd..3a90c382f0 100644
--- a/synapse/storage/pdu.py
+++ b/synapse/storage/pdu.py
@@ -69,7 +69,7 @@ class PduStore(SQLBaseStore):
 
             edge_hashes = self._get_prev_pdu_hashes_txn(txn, pdu_id, origin)
 
-            hashes = self._get_pdu_hashes_txn(txn, pdu_id, origin)
+            hashes = self._get_pdu_content_hashes_txn(txn, pdu_id, origin)
             signatures = self._get_pdu_origin_signatures_txn(
                 txn, pdu_id, origin
             )
@@ -317,7 +317,7 @@ class PduStore(SQLBaseStore):
 
         results = []
         for pdu_id, origin, depth in txn.fetchall():
-            hashes = self._get_pdu_hashes_txn(txn, pdu_id, origin)
+            hashes = self._get_pdu_reference_hashes_txn(txn, pdu_id, origin)
             sha256_bytes = hashes["sha256"]
             prev_hashes = {"sha256": encode_base64(sha256_bytes)}
             results.append((pdu_id, origin, prev_hashes, depth))