mirror of
https://github.com/element-hq/synapse
synced 2024-09-11 14:45:10 +00:00
Respect min_depth argument
This commit is contained in:
parent
6dfd8c73fc
commit
39aa968a76
1 changed files with 6 additions and 4 deletions
|
@ -507,10 +507,12 @@ class FederationClient(FederationBase):
|
||||||
|
|
||||||
missing_events = {}
|
missing_events = {}
|
||||||
for e in itertools.chain(latest_events, signed_events):
|
for e in itertools.chain(latest_events, signed_events):
|
||||||
missing_events.update({
|
if e.depth > min_depth:
|
||||||
e_id: e.depth for e_id, _ in e.prev_events
|
missing_events.update({
|
||||||
if e_id not in seen_events and e_id not in failed_to_fetch
|
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:
|
if not missing_events:
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue