From d22423c02c31c4fa8be15207187ef4f77e05c612 Mon Sep 17 00:00:00 2001 From: tgiachi Date: Tue, 10 Nov 2026 15:16:02 +0100 Subject: [PATCH] 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. --- internal/store/store.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/store/store.go b/internal/store/store.go index e65d4fc..e2fecd7 100644 --- a/internal/store/store.go +++ b/internal/store/store.go @@ -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