From 1f3d2c6acdf89aae194b7aa46d817aa119291b61 Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Tue, 14 Feb 2017 17:24:23 +0000 Subject: [PATCH] More comments --- src/github.com/matrix-org/dendrite/roomserver/input/state.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/github.com/matrix-org/dendrite/roomserver/input/state.go b/src/github.com/matrix-org/dendrite/roomserver/input/state.go index e76406ba5..2012571a1 100644 --- a/src/github.com/matrix-org/dendrite/roomserver/input/state.go +++ b/src/github.com/matrix-org/dendrite/roomserver/input/state.go @@ -140,7 +140,8 @@ func calculateAndStoreStateMany(db RoomEventDatabase, roomNID types.RoomNID, pre } // 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)) // Remove duplicate entires. combined = combined[:unique(stateEntrySorter(combined))]