satellite/satellitedb: Add comment to revocation

Change-Id: I1b65b7e46439c4788835ea5bfd4df3d32a713b44
This commit is contained in:
Isaac Hess 2020-06-22 14:14:23 -06:00 committed by Stefan Benten
parent db55386fbc
commit fd740295ec

View File

@ -31,6 +31,10 @@ func (db *revocationDB) Check(ctx context.Context, tails [][]byte) (bool, error)
return false, errs.New("Empty list of tails") return false, errs.New("Empty list of tails")
} }
// The finalTail is the last tail provided in the macaroon. We cache the
// revocation status of this final tail so that, if this macaroon is used
// again before the cache key expires, we do not have to check the database
// again.
finalTail := tails[numTails-1] finalTail := tails[numTails-1]
val, err := db.lru.Get(string(finalTail), func() (interface{}, error) { val, err := db.lru.Get(string(finalTail), func() (interface{}, error) {