summary refs log tree commit diff
path: root/synapse/federation
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-08-27 11:34:31 +0100
committerMark Haines <mark.haines@matrix.org>2014-08-27 11:34:31 +0100
commit474dcecb1166440aa0e207aa978b9a822460f5bc (patch)
tree537e637687aee2b0132252e0b1eccf50542d3824 /synapse/federation
parentMerge branch 'develop' into storage_transactions (diff)
downloadsynapse-474dcecb1166440aa0e207aa978b9a822460f5bc.tar.xz
Remove unused populate_previous_pdus
Diffstat (limited to 'synapse/federation')
-rw-r--r--synapse/federation/persistence.py19
-rw-r--r--synapse/federation/replication.py2
2 files changed, 0 insertions, 21 deletions
diff --git a/synapse/federation/persistence.py b/synapse/federation/persistence.py
index 2286fca821..4cf72b2e42 100644
--- a/synapse/federation/persistence.py
+++ b/synapse/federation/persistence.py
@@ -50,25 +50,6 @@ class PduActions(object):
 
     @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):
         """ Returns all `Pdu`s that we sent to the given remote home server
         after a given transaction id.
diff --git a/synapse/federation/replication.py b/synapse/federation/replication.py
index 731cb74dd2..38ae360bcd 100644
--- a/synapse/federation/replication.py
+++ b/synapse/federation/replication.py
@@ -134,8 +134,6 @@ class ReplicationLayer(object):
 
         logger.debug("[%s] Persisting PDU", pdu.pdu_id)
 
-        #yield self.pdu_actions.populate_previous_pdus(pdu)
-
         # Save *before* trying to send
         yield self.store.persist_event(pdu=pdu)