mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-26 15:08:28 +00:00
Fix resolve-state
This commit is contained in:
parent
b7cf702a14
commit
7b2e141fa9
1 changed files with 6 additions and 11 deletions
|
@ -50,23 +50,18 @@ func main() {
|
|||
panic(err)
|
||||
}
|
||||
|
||||
blockNIDs, err := roomserverDB.StateBlockNIDs(ctx, snapshotNIDs)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
var stateEntries []types.StateEntryList
|
||||
for _, list := range blockNIDs {
|
||||
entries, err2 := roomserverDB.StateEntries(ctx, list.StateBlockNIDs)
|
||||
var stateEntries [][]types.StateEntry
|
||||
for _, nid := range snapshotNIDs {
|
||||
entries, err2 := roomserverDB.StateEntries(ctx, nid)
|
||||
if err2 != nil {
|
||||
panic(err2)
|
||||
}
|
||||
stateEntries = append(stateEntries, entries...)
|
||||
stateEntries = append(stateEntries, entries)
|
||||
}
|
||||
|
||||
var eventNIDs []types.EventNID
|
||||
for _, entry := range stateEntries {
|
||||
for _, e := range entry.StateEntries {
|
||||
for _, list := range stateEntries {
|
||||
for _, e := range list {
|
||||
eventNIDs = append(eventNIDs, e.EventNID)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue