Fix comments

This commit is contained in:
Mark Haines 2017-03-06 18:07:43 +00:00
parent e4189ef75d
commit 2763649fed

View file

@ -61,7 +61,7 @@ func calculateAndStoreStateAfterEvents(db RoomEventDatabase, roomNID types.RoomN
) )
} }
// If there are too many deltas then we need to calculate the full state // If there are too many deltas then we need to calculate the full state
// So fall through to calculateAndStoreStateMany // So fall through to calculateAndStoreStateAfterManyEvents
} }
return calculateAndStoreStateAfterManyEvents(db, roomNID, prevStates) return calculateAndStoreStateAfterManyEvents(db, roomNID, prevStates)
} }
@ -185,7 +185,7 @@ func loadStateAtSnapshot(db RoomEventDatabase, stateNID types.StateSnapshotNID)
stateEntriesMap := stateEntryListMap(stateEntryLists) stateEntriesMap := stateEntryListMap(stateEntryLists)
// Combined all the state entries for this snapshot. // Combined all the state entries for this snapshot.
// The order of state data NIDs in the list tells us the order to combine them in. // The order of state block NIDs in the list tells us the order to combine them in.
var fullState []types.StateEntry var fullState []types.StateEntry
for _, stateBlockNID := range stateBlockNIDList.StateBlockNIDs { for _, stateBlockNID := range stateBlockNIDList.StateBlockNIDs {
entries, ok := stateEntriesMap.lookup(stateBlockNID) entries, ok := stateEntriesMap.lookup(stateBlockNID)
@ -248,7 +248,7 @@ func loadCombinedStateAfterEvents(db RoomEventDatabase, prevStates []types.State
} }
// Combined all the state entries for this snapshot. // Combined all the state entries for this snapshot.
// The order of state data NIDs in the list tells us the order to combine them in. // The order of state block NIDs in the list tells us the order to combine them in.
var fullState []types.StateEntry var fullState []types.StateEntry
for _, stateBlockNID := range stateBlockNIDs { for _, stateBlockNID := range stateBlockNIDs {
entries, ok := stateEntriesMap.lookup(stateBlockNID) entries, ok := stateEntriesMap.lookup(stateBlockNID)