improve faq+privacy policy; rename pow and access tracker intialize functions to just New
since they are in their own package now
This commit is contained in:
@@ -27,7 +27,7 @@ type ChallengeStore struct {
|
||||
|
||||
const MaxChallenges = 10000
|
||||
|
||||
func NewChallengeStore(ttl time.Duration) *ChallengeStore {
|
||||
func New(ttl time.Duration) *ChallengeStore {
|
||||
if ttl <= 0 || ttl > 10*time.Minute {
|
||||
panic("invalid challenge ttl")
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ type AccessTracker struct {
|
||||
pending map[string]int64
|
||||
}
|
||||
|
||||
func NewAccessTracker() *AccessTracker {
|
||||
func New() *AccessTracker {
|
||||
return &AccessTracker{
|
||||
pending: make(map[string]int64),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user