From e36204a959f4b059c29a066b5b69330ad0f37d6c Mon Sep 17 00:00:00 2001 From: trpdjke Date: Thu, 8 Aug 2024 11:29:14 +0300 Subject: [PATCH] fix filteredEvents in event.Run --- internal/service/event/main.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/service/event/main.go b/internal/service/event/main.go index 168332b..1fbf371 100644 --- a/internal/service/event/main.go +++ b/internal/service/event/main.go @@ -38,20 +38,19 @@ func Run(cfg config.Config, date int) error { return nil } - nullifiers := make([]string, 0) + nullifiers := make([]string, 0, len(balances)) for _, balance := range balances { nullifiers = append(nullifiers, balance.Nullifier) } filteredEvents, err := eventsQ. - FilterByType(models.TypeEarlyTest). FilterByStatus(data.EventFulfilled). FilterByNullifier(nullifiers...). Select() if err != nil { - log.WithError(err).Error("failed to filter eventsQ") + log.WithError(err).Error("Failed to select %s events") return err }