refactor(store): drop a redundant zero check in the cap warning

now.Sub of the zero time is already longer than a minute, so the first
refusal is logged without a special case.
This commit is contained in:
tgiachi 2026-11-10 15:16:02 +01:00
commit d22423c02c

View file

@ -812,7 +812,7 @@ func (s *Store) CreatePending(listID int64, addr, action string) (token string,
func (s *Store) warnPendingCap(now time.Time, n int) {
s.capLogMu.Lock()
defer s.capLogMu.Unlock()
if !s.capLoggedAt.IsZero() && now.Sub(s.capLoggedAt) < pendingCapLogEvery {
if now.Sub(s.capLoggedAt) < pendingCapLogEvery {
return
}
s.capLoggedAt = now