From 0bb3e17c4e4b8a4d65b3d1d19a0b5adc9b2691c9 Mon Sep 17 00:00:00 2001 From: Aleksandr Pismenskiy Date: Fri, 13 Sep 2024 11:31:41 +0300 Subject: [PATCH] change behaviour for update period --- internal/subscriber/subscriber.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/subscriber/subscriber.go b/internal/subscriber/subscriber.go index aad5aed..ddf8bca 100644 --- a/internal/subscriber/subscriber.go +++ b/internal/subscriber/subscriber.go @@ -177,7 +177,7 @@ func (s *Subscriber) processBlockEvent(ctx context.Context, tasks chan neutronty for _, activeQuery := range s.activeQueries { // Skip the ActiveQuery if we didn't reach the update time. - if currentHeight < (activeQuery.LastSubmittedResultLocalHeight + activeQuery.UpdatePeriod) { + if activeQuery.LastSubmittedResultLocalHeight != 0 && currentHeight < (activeQuery.LastSubmittedResultLocalHeight+activeQuery.UpdatePeriod) { continue }