diff --git a/ratelimits/bucket.go b/ratelimits/bucket.go index 33228ff6e930..75b54fa05a31 100644 --- a/ratelimits/bucket.go +++ b/ratelimits/bucket.go @@ -235,9 +235,10 @@ func (builder *TransactionBuilder) OrdersPerAccountTransaction(regId int64) (Tra return newTransaction(limit, bucketKey, 1) } -// FailedAuthorizationsPerDomainPerAccountCheckOnlyTransactions returns a slice of -// Transactions for the provided order domain names. An error is returned if any -// of the order domain names are invalid. +// FailedAuthorizationsPerDomainPerAccountCheckOnlyTransactions returns a slice +// of Transactions for the provided order domain names. An error is returned if +// any of the order domain names are invalid. This method should be used for +// checking capacity, before allowing more authorizations to be created. func (builder *TransactionBuilder) FailedAuthorizationsPerDomainPerAccountCheckOnlyTransactions(regId int64, orderDomains []string, maxNames int) ([]Transaction, error) { if len(orderDomains) > maxNames { return nil, fmt.Errorf("order contains more than %d DNS names", maxNames) @@ -273,6 +274,10 @@ func (builder *TransactionBuilder) FailedAuthorizationsPerDomainPerAccountCheckO return txns, nil } +// FailedAuthorizationsPerDomainPerAccountSpendOnlyTransactions returns a slice +// of Transactions for the provided order domain names. An error is returned if +// any of the order domain names are invalid. This method should be used for +// spending capacity, as a result of a failed authorization. func (builder *TransactionBuilder) FailedAuthorizationsPerDomainPerAccountSpendOnlyTransactions(regId int64, orderDomains []string, maxNames int) ([]Transaction, error) { if len(orderDomains) > maxNames { return nil, fmt.Errorf("order contains more than %d DNS names", maxNames)