aboutsummaryrefslogtreecommitdiff
path: root/cmd/resolve-state/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/resolve-state/main.go')
-rw-r--r--cmd/resolve-state/main.go17
1 files changed, 4 insertions, 13 deletions
diff --git a/cmd/resolve-state/main.go b/cmd/resolve-state/main.go
index 9fb14f05..a622fbf2 100644
--- a/cmd/resolve-state/main.go
+++ b/cmd/resolve-state/main.go
@@ -80,9 +80,9 @@ func main() {
}
authEventIDMap := make(map[string]struct{})
- eventPtrs := make([]*gomatrixserverlib.Event, len(eventEntries))
+ events := make([]*gomatrixserverlib.Event, len(eventEntries))
for i := range eventEntries {
- eventPtrs[i] = &eventEntries[i].Event
+ events[i] = eventEntries[i].Event
for _, authEventID := range eventEntries[i].AuthEventIDs() {
authEventIDMap[authEventID] = struct{}{}
}
@@ -99,18 +99,9 @@ func main() {
panic(err)
}
- authEventPtrs := make([]*gomatrixserverlib.Event, len(authEventEntries))
+ authEvents := make([]*gomatrixserverlib.Event, len(authEventEntries))
for i := range authEventEntries {
- authEventPtrs[i] = &authEventEntries[i].Event
- }
-
- events := make([]gomatrixserverlib.Event, len(eventEntries))
- authEvents := make([]gomatrixserverlib.Event, len(authEventEntries))
- for i, ptr := range eventPtrs {
- events[i] = *ptr
- }
- for i, ptr := range authEventPtrs {
- authEvents[i] = *ptr
+ authEvents[i] = authEventEntries[i].Event
}
fmt.Println("Resolving state")