mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 07:28:27 +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)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
blockNIDs, err := roomserverDB.StateBlockNIDs(ctx, snapshotNIDs)
|
var stateEntries [][]types.StateEntry
|
||||||
if err != nil {
|
for _, nid := range snapshotNIDs {
|
||||||
panic(err)
|
entries, err2 := roomserverDB.StateEntries(ctx, nid)
|
||||||
}
|
|
||||||
|
|
||||||
var stateEntries []types.StateEntryList
|
|
||||||
for _, list := range blockNIDs {
|
|
||||||
entries, err2 := roomserverDB.StateEntries(ctx, list.StateBlockNIDs)
|
|
||||||
if err2 != nil {
|
if err2 != nil {
|
||||||
panic(err2)
|
panic(err2)
|
||||||
}
|
}
|
||||||
stateEntries = append(stateEntries, entries...)
|
stateEntries = append(stateEntries, entries)
|
||||||
}
|
}
|
||||||
|
|
||||||
var eventNIDs []types.EventNID
|
var eventNIDs []types.EventNID
|
||||||
for _, entry := range stateEntries {
|
for _, list := range stateEntries {
|
||||||
for _, e := range entry.StateEntries {
|
for _, e := range list {
|
||||||
eventNIDs = append(eventNIDs, e.EventNID)
|
eventNIDs = append(eventNIDs, e.EventNID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue