Skip to content

Commit adff2c9

Browse files
authored
Merge pull request #93 from neutron-org/fix/change-update-period-behaviour
fix: change behaviour for update period #NTRN-396
2 parents 12b4508 + 0bb3e17 commit adff2c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/subscriber/subscriber.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ func (s *Subscriber) processBlockEvent(ctx context.Context, tasks chan neutronty
177177

178178
for _, activeQuery := range s.activeQueries {
179179
// Skip the ActiveQuery if we didn't reach the update time.
180-
if currentHeight < (activeQuery.LastSubmittedResultLocalHeight + activeQuery.UpdatePeriod) {
180+
if activeQuery.LastSubmittedResultLocalHeight != 0 && currentHeight < (activeQuery.LastSubmittedResultLocalHeight+activeQuery.UpdatePeriod) {
181181
continue
182182
}
183183

0 commit comments

Comments
 (0)