mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-01 13:52:46 +00:00
Clean up a bit
This commit is contained in:
parent
8c2bb18697
commit
b4d1ebf54a
2 changed files with 0 additions and 26 deletions
|
@ -130,31 +130,10 @@ func (d *Database) StateEntriesForTuples(
|
|||
if err != nil {
|
||||
return nil, fmt.Errorf("d.EventsTable.BulkSelectStateEventByNID: %w", err)
|
||||
}
|
||||
//if len(stateKeyTuples) == 0 {
|
||||
lists = append(lists, types.StateEntryList{
|
||||
StateBlockNID: stateBlockNIDs[i],
|
||||
StateEntries: entries,
|
||||
})
|
||||
/*} else {
|
||||
eventTypes := map[types.EventTypeNID]struct{}{}
|
||||
stateKeys := map[types.EventStateKeyNID]struct{}{}
|
||||
for _, t := range stateKeyTuples {
|
||||
eventTypes[t.EventTypeNID] = struct{}{}
|
||||
stateKeys[t.EventStateKeyNID] = struct{}{}
|
||||
}
|
||||
filteredEntries := []types.StateEntry{}
|
||||
for _, entry := range entries {
|
||||
_, tok := eventTypes[entry.EventTypeNID]
|
||||
_, sok := stateKeys[entry.EventStateKeyNID]
|
||||
if tok && sok {
|
||||
filteredEntries = append(filteredEntries, entry)
|
||||
}
|
||||
}
|
||||
lists = append(lists, types.StateEntryList{
|
||||
StateBlockNID: stateBlockNIDs[i],
|
||||
StateEntries: filteredEntries,
|
||||
})
|
||||
}*/
|
||||
}
|
||||
return lists, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue