More comments

This commit is contained in:
Mark Haines 2017-02-14 17:24:23 +00:00
parent 2a33b17ee1
commit 1f3d2c6acd

View file

@ -140,7 +140,8 @@ func calculateAndStoreStateMany(db RoomEventDatabase, roomNID types.RoomNID, pre
} }
// Collect all the entries with the same type and key together. // Collect all the entries with the same type and key together.
// We don't care about the order here. // We don't care about the order here because the conflict resolution
// algorithm doesn't depend on the order of the prev events.
sort.Sort(stateEntrySorter(combined)) sort.Sort(stateEntrySorter(combined))
// Remove duplicate entires. // Remove duplicate entires.
combined = combined[:unique(stateEntrySorter(combined))] combined = combined[:unique(stateEntrySorter(combined))]