From 5a7e332d1f1f78a85a3124c4a8a22a5d40d24a87 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Tue, 16 Jun 2020 12:21:58 +0100 Subject: [PATCH] Update comments --- internal/caching/cache_serverkeys.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/caching/cache_serverkeys.go b/internal/caching/cache_serverkeys.go index 1ccd6ee32..4697fb4d2 100644 --- a/internal/caching/cache_serverkeys.go +++ b/internal/caching/cache_serverkeys.go @@ -17,6 +17,9 @@ const ( type ServerKeyCache interface { // request -> timestamp is emulating gomatrixserverlib.FetchKeys: // https://github.com/matrix-org/gomatrixserverlib/blob/f69539c86ea55d1e2cc76fd8e944e2d82d30397c/keyring.go#L95 + // The timestamp should be the timestamp of the event that is being + // verified. We will not return keys from the cache that are not valid + // at this timestamp. GetServerKey(request gomatrixserverlib.PublicKeyLookupRequest, timestamp gomatrixserverlib.Timestamp) (response gomatrixserverlib.PublicKeyLookupResult, ok bool) // request -> result is emulating gomatrixserverlib.StoreKeys: