diff options
author | Till <2353100+S7evinK@users.noreply.github.com> | 2023-02-24 09:40:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-24 09:40:20 +0100 |
commit | ad07b169b8a58b5a843b7b19ff0a989399d0aea0 (patch) | |
tree | 8904e5e52ecec90aa94f748c10a08b08cdf01de1 /cmd | |
parent | e6aa0955ff4113114ff8f30073582cc4ecc454fa (diff) |
Refactor `StoreEvent` and create a new `RoomDatabase` interface (#2985)
This PR changes a few things:
- It pulls out the creation of several NIDs from the `StoreEvent`
function to make the functions more reusable
- Uses more caching when using those NIDs to avoid DB round trips
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/resolve-state/main.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/resolve-state/main.go b/cmd/resolve-state/main.go index 59c66aed..e3840bbc 100644 --- a/cmd/resolve-state/main.go +++ b/cmd/resolve-state/main.go @@ -87,7 +87,7 @@ func main() { } var eventEntries []types.Event - eventEntries, err = roomserverDB.Events(ctx, eventNIDs) + eventEntries, err = roomserverDB.Events(ctx, 0, eventNIDs) if err != nil { panic(err) } @@ -145,7 +145,7 @@ func main() { } fmt.Println("Fetching", len(eventNIDMap), "state events") - eventEntries, err := roomserverDB.Events(ctx, eventNIDs) + eventEntries, err := roomserverDB.Events(ctx, 0, eventNIDs) if err != nil { panic(err) } @@ -165,7 +165,7 @@ func main() { } fmt.Println("Fetching", len(authEventIDs), "auth events") - authEventEntries, err := roomserverDB.EventsFromIDs(ctx, authEventIDs) + authEventEntries, err := roomserverDB.EventsFromIDs(ctx, 0, authEventIDs) if err != nil { panic(err) } |