mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:26:09 -04:00
Split out SignatureStore and EventFederationStore
This commit is contained in:
parent
17445e6701
commit
a9a2d66cdd
3 changed files with 148 additions and 174 deletions
|
@ -22,9 +22,7 @@ from synapse.crypto.event_signing import compute_event_reference_hash
|
|||
from synapse.util.caches.descriptors import cached, cachedList
|
||||
|
||||
|
||||
class SignatureStore(SQLBaseStore):
|
||||
"""Persistence for event signatures and hashes"""
|
||||
|
||||
class SignatureWorkerStore(SQLBaseStore):
|
||||
@cached()
|
||||
def get_event_reference_hash(self, event_id):
|
||||
return self._get_event_reference_hashes_txn(event_id)
|
||||
|
@ -74,6 +72,10 @@ class SignatureStore(SQLBaseStore):
|
|||
txn.execute(query, (event_id, ))
|
||||
return {k: v for k, v in txn}
|
||||
|
||||
|
||||
class SignatureStore(SignatureWorkerStore):
|
||||
"""Persistence for event signatures and hashes"""
|
||||
|
||||
def _store_event_reference_hashes_txn(self, txn, events):
|
||||
"""Store a hash for a PDU
|
||||
Args:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue