Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Jun 18, 2024
1 parent f237303 commit ef47167
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions synapse/storage/databases/main/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ def is_noop(self) -> bool:

@attr.s(slots=True, auto_attribs=True)
class NewEventChainLinks:
"""Information about new auth chain links that need to be added to the DB.
Attributes:
chain_id, sequence_number: the IDs corresponding to the event being
inserted, and the starting point of the links
links: Lists the links that need to be added, 2-tuple of the chain
ID/sequence number of the end point of the link.
"""

chain_id: int
sequence_number: int

Expand Down Expand Up @@ -661,6 +670,10 @@ def _calculate_chain_cover_index(
event_to_types: Event ID to type and state_key of the event
event_to_auth_chain: Event ID to list of auth event IDs of the
event (events with no auth events can be excluded).
Returns:
A mapping with any new auth chain links we need to add, keyed by
event ID.
"""

# Map from event ID to chain ID/sequence number.
Expand Down

0 comments on commit ef47167

Please sign in to comment.