Better description of the mainline of a PL event.

This commit is contained in:
David Robertson 2022-06-01 15:02:31 +01:00
parent 31304300f5
commit 45440197de
No known key found for this signature in database
GPG key ID: 903ECE108A39DEDD

View file

@ -82,10 +82,15 @@ selecting, among all the candidate vertices, the smallest vertex using
the above comparison relation.
**Mainline ordering.**
Given an `m.room.power_levels` event *P*, the *mainline of* *P* is the
list of events generated by starting with *P* and recursively taking the
`m.room.power_levels` events from the `auth_events`, ordered such that
*P* is last. Given another event *e*, the *closest mainline event to*
Let *P* = *P*<sub>0</sub> be an `m.room.power_levels` event.
Starting with *i* = 0, repeatedly fetch *P*<sub>*i*+1</sub>, the
`m.room.power_levels` event in the `auth_events` of *P<sub>i</sub>*.
Increment *i* and repeat until *P<sub>i</sub>* has no `m.room.power_levels`
event in its `auth_events`.
The *mainline of P*<sub>0</sub> is the list of events
[*P*<sub>n</sub> , ... , *P*<sub>1</sub>, *P*<sub>0</sub>].
Given another event *e*, the *closest mainline event to*
*e* is the first event encountered in the mainline when iteratively
descending through the `m.room.power_levels` events in the `auth_events`
starting at *e*. If no mainline event is encountered when iteratively