From 37a92b15ce53d88e77c5c67a4b341b6a8eff706e Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Thu, 19 Mar 2020 18:13:47 +0000 Subject: [PATCH] Update comments --- roomserver/state/state.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/roomserver/state/state.go b/roomserver/state/state.go index 0e81ddddb..b8e3e18a1 100644 --- a/roomserver/state/state.go +++ b/roomserver/state/state.go @@ -81,7 +81,7 @@ func (v StateResolution) LoadStateAtSnapshot( return fullState, nil } -// LoadStateAtEvent loads the full state of a room at a particular event. +// LoadStateAtEvent loads the full state of a room before a particular event. func (v StateResolution) LoadStateAtEvent( ctx context.Context, eventID string, ) ([]types.StateEntry, error) { @@ -99,7 +99,8 @@ func (v StateResolution) LoadStateAtEvent( } // LoadCombinedStateAfterEvents loads a snapshot of the state after each of the events -// and combines those snapshots together into a single list. +// and combines those snapshots together into a single list. At this point it is +// possible to run into duplicate (type, state key) tuples. func (v StateResolution) LoadCombinedStateAfterEvents( ctx context.Context, prevStates []types.StateAtEvent, ) ([]types.StateEntry, error) {