mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-07 06:53:09 -06:00
Rename duplicateStateKeys to findDuplicateStateKeys
This commit is contained in:
parent
7fc31eee66
commit
bed16c0808
|
|
@ -137,7 +137,7 @@ func calculateAndStoreStateMany(db RoomEventDatabase, roomNID types.RoomNID, pre
|
||||||
combined = combined[:unique(stateEntrySorter(combined))]
|
combined = combined[:unique(stateEntrySorter(combined))]
|
||||||
|
|
||||||
// Find the conflicts
|
// Find the conflicts
|
||||||
conflicts := duplicateStateKeys(combined)
|
conflicts := findDuplicateStateKeys(combined)
|
||||||
|
|
||||||
var state []types.StateEntry
|
var state []types.StateEntry
|
||||||
if len(conflicts) > 0 {
|
if len(conflicts) > 0 {
|
||||||
|
|
@ -162,7 +162,7 @@ func resolveConflicts(db RoomEventDatabase, combined, conflicted []types.StateEn
|
||||||
panic(fmt.Errorf("Not implemented"))
|
panic(fmt.Errorf("Not implemented"))
|
||||||
}
|
}
|
||||||
|
|
||||||
func duplicateStateKeys(a []types.StateEntry) []types.StateEntry {
|
func findDuplicateStateKeys(a []types.StateEntry) []types.StateEntry {
|
||||||
var result []types.StateEntry
|
var result []types.StateEntry
|
||||||
j := 0
|
j := 0
|
||||||
for i := 1; i < len(a); i++ {
|
for i := 1; i < len(a); i++ {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue