mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 17:54:48 -04:00
Remove unused populate_previous_pdus
This commit is contained in:
parent
bf05218c4b
commit
474dcecb11
3 changed files with 1 additions and 27 deletions
|
@ -48,25 +48,6 @@ class PduActions(object):
|
|||
"""
|
||||
return self.store.mark_pdu_as_processed(pdu.pdu_id, pdu.origin)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
@log_function
|
||||
def populate_previous_pdus(self, pdu):
|
||||
""" Given an outgoing `Pdu` fill out its `prev_ids` key with the `Pdu`s
|
||||
that we have received.
|
||||
|
||||
Returns:
|
||||
Deferred
|
||||
"""
|
||||
results = yield self.store.get_latest_pdus_in_context(pdu.context)
|
||||
|
||||
pdu.prev_pdus = [(p_id, origin) for p_id, origin, _ in results]
|
||||
|
||||
vs = [int(v) for _, _, v in results]
|
||||
if vs:
|
||||
pdu.depth = max(vs) + 1
|
||||
else:
|
||||
pdu.depth = 0
|
||||
|
||||
@defer.inlineCallbacks
|
||||
@log_function
|
||||
def after_transaction(self, transaction_id, destination, origin):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue