Skip to content

Commit

Permalink
fix: update logic to prevent duplicate broadcasts
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-bisonai committed Aug 14, 2024
1 parent fa2b818 commit d6fa5ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion node/pkg/dal/collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func (c *Collector) compareAndSwapLatestTimestamp(data *aggregator.SubmissionDat
defer c.mu.Unlock()

old, ok := c.LatestTimestamps[data.GlobalAggregate.ConfigID]
if !ok || !old.After(data.GlobalAggregate.Timestamp) {
if !ok || old.Before(data.GlobalAggregate.Timestamp) {
c.LatestTimestamps[data.GlobalAggregate.ConfigID] = data.GlobalAggregate.Timestamp
return true
}
Expand Down

0 comments on commit d6fa5ba

Please sign in to comment.