summary refs log tree commit diff
path: root/synapse/federation
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-03-05 16:31:32 +0000
committerErik Johnston <erik@matrix.org>2015-03-05 16:31:32 +0000
commit39aa968a764816632a05ac0e3cf9c865b7a3a68d (patch)
tree459b0fed1887498f755504345e31ccee8b296050 /synapse/federation
parentDocs. (diff)
downloadsynapse-39aa968a764816632a05ac0e3cf9c865b7a3a68d.tar.xz
Respect min_depth argument
Diffstat (limited to 'synapse/federation')
-rw-r--r--synapse/federation/federation_client.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/synapse/federation/federation_client.py b/synapse/federation/federation_client.py
index 11e2753fed..75b6a7b46a 100644
--- a/synapse/federation/federation_client.py
+++ b/synapse/federation/federation_client.py
@@ -507,10 +507,12 @@ class FederationClient(FederationBase):
 
             missing_events = {}
             for e in itertools.chain(latest_events, signed_events):
-                missing_events.update({
-                    e_id: e.depth for e_id, _ in e.prev_events
-                    if e_id not in seen_events and e_id not in failed_to_fetch
-                })
+                if e.depth > min_depth:
+                    missing_events.update({
+                        e_id: e.depth for e_id, _ in e.prev_events
+                        if e_id not in seen_events
+                        and e_id not in failed_to_fetch
+                    })
 
             if not missing_events:
                 break