mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-09-05 07:21:54 +00:00
More comments
This commit is contained in:
parent
890cb048fd
commit
d730c2c22b
@ -782,6 +782,7 @@ class FederationHandler(BaseHandler):
|
|||||||
# auth chain. Caution must therefore be taken to ensure that they are
|
# auth chain. Caution must therefore be taken to ensure that they are
|
||||||
# not accidentally marked as outliers.
|
# not accidentally marked as outliers.
|
||||||
|
|
||||||
|
# Step 1a: persist auth events that *don't* appear in the chunk
|
||||||
ev_infos = []
|
ev_infos = []
|
||||||
for a in auth_events.values():
|
for a in auth_events.values():
|
||||||
# We only want to persist auth events as outliers that we haven't
|
# We only want to persist auth events as outliers that we haven't
|
||||||
@ -800,6 +801,8 @@ class FederationHandler(BaseHandler):
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# Step 1b: persist the events in the chunk we fetched state for (i.e.
|
||||||
|
# the backwards extremities) as non-outliers.
|
||||||
for e_id in events_to_state:
|
for e_id in events_to_state:
|
||||||
# For paranoia we ensure that these events are marked as
|
# For paranoia we ensure that these events are marked as
|
||||||
# non-outliers
|
# non-outliers
|
||||||
@ -822,6 +825,7 @@ class FederationHandler(BaseHandler):
|
|||||||
backfilled=True,
|
backfilled=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Step 2: Persist the rest of the events in the chunk one by one
|
||||||
events.sort(key=lambda e: e.depth)
|
events.sort(key=lambda e: e.depth)
|
||||||
|
|
||||||
for event in events:
|
for event in events:
|
||||||
|
Loading…
Reference in New Issue
Block a user