Only do this for non-state events, since state events will always result in state change at extremities

This commit is contained in:
Neil Alexander 2021-01-15 14:32:27 +00:00
parent 3b67ac7327
commit c82a72b179
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -204,6 +204,7 @@ func (u *latestEventsUpdater) latestState() error {
// Work out if the state at the extremities has actually changed
// or not. If they haven't then we won't bother doing all of the
// hard work.
if u.event.StateKey() == nil {
stateChanged := false
oldStateNIDs := make([]types.StateSnapshotNID, 0, len(u.oldLatest))
newStateNIDs := make([]types.StateSnapshotNID, 0, len(u.latest))
@ -229,6 +230,7 @@ func (u *latestEventsUpdater) latestState() error {
u.newStateNID = u.oldStateNID
return nil
}
}
// Get a list of the current latest events. This may or may not
// include the new event from the input path, depending on whether