@@ -30,8 +30,7 @@ func baseDomain(name string) string {
3030
3131// addCertificatesPerName adds 1 to the rate limit count for the provided
3232// domains, in a specific time bucket. It must be executed in a transaction, and
33- // the input timeToTheHour must be a time rounded to an hour. It assumes that
34- // the given db already has a context associated with it.
33+ // the input timeToTheHour must be a time rounded to an hour.
3534func (ssa * SQLStorageAuthority ) addCertificatesPerName (ctx context.Context , db db.SelectExecer , names []string , timeToTheHour time.Time ) error {
3635 // De-duplicate the base domains.
3736 baseDomainsMap := make (map [string ]bool )
@@ -57,8 +56,7 @@ func (ssa *SQLStorageAuthority) addCertificatesPerName(ctx context.Context, db d
5756}
5857
5958// countCertificates returns the count of certificates issued for a domain's
60- // eTLD+1 (aka base domain), during a given time range. It assumes that the
61- // given db already has a context associated with it.
59+ // eTLD+1 (aka base domain), during a given time range.
6260func (ssa * SQLStorageAuthorityRO ) countCertificates (ctx context.Context , dbMap db.Selector , domain string , timeRange * sapb.Range ) (int64 , time.Time , error ) {
6361 latest := time .Unix (0 , timeRange .Latest )
6462 var results []struct {
@@ -102,8 +100,7 @@ func (ssa *SQLStorageAuthorityRO) countCertificates(ctx context.Context, dbMap d
102100
103101// addNewOrdersRateLimit adds 1 to the rate limit count for the provided ID, in
104102// a specific time bucket. It must be executed in a transaction, and the input
105- // timeToTheMinute must be a time rounded to a minute. It assumes that the given
106- // db already has a context associated with it.
103+ // timeToTheMinute must be a time rounded to a minute.
107104func addNewOrdersRateLimit (ctx context.Context , dbMap db.SelectExecer , regID int64 , timeToTheMinute time.Time ) error {
108105 _ , err := dbMap .ExecContext (ctx , `INSERT INTO newOrdersRL
109106 (regID, time, count)
@@ -119,8 +116,7 @@ func addNewOrdersRateLimit(ctx context.Context, dbMap db.SelectExecer, regID int
119116}
120117
121118// countNewOrders returns the count of orders created in the given time range
122- // for the given registration ID. It assumes that the given db already has a
123- // context associated with it.
119+ // for the given registration ID.
124120func countNewOrders (ctx context.Context , dbMap db.Selector , req * sapb.CountOrdersRequest ) (* sapb.Count , error ) {
125121 var counts []int64
126122 _ , err := dbMap .Select (
0 commit comments