Skip to content

Commit

Permalink
Merge pull request #822 from oasisprotocol/ptrus/feature/trivial-erro…
Browse files Browse the repository at this point in the history
…rs-check

analyer/aggregate_stats: fix errors check
  • Loading branch information
ptrus authored Dec 10, 2024
2 parents ca4ef6d + 19702fa commit 2225e3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Empty file added .changelog/822.trivial.md
Empty file.
6 changes: 3 additions & 3 deletions analyzer/aggregate_stats/aggregate_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,14 @@ func (a *aggregateStatsAnalyzer) aggregateStatsWorker(ctx context.Context) {
switch {
case err == nil:
// Continues below.
case errors.Is(pgx.ErrNoRows, err):
case errors.Is(err, pgx.ErrNoRows):
// No stats yet. Start at the earliest indexed block.
var earliestBlockTs *time.Time
earliestBlockTs, err = a.earliestBlockTs(statCtx, statsComputation.layer)
switch {
case err == nil:
latestComputed = floorWindow(earliestBlockTs)
case errors.Is(pgx.ErrNoRows, err):
case errors.Is(err, pgx.ErrNoRows):
// No data log a debug only log.
logger.Debug("no stats available yet, skipping iteration")
cancel()
Expand All @@ -234,7 +234,7 @@ func (a *aggregateStatsAnalyzer) aggregateStatsWorker(ctx context.Context) {
switch {
case err == nil:
// Continues below.
case errors.Is(pgx.ErrNoRows, err):
case errors.Is(err, pgx.ErrNoRows):
logger.Debug("no stats available yet, skipping iteration")
cancel()
continue
Expand Down

0 comments on commit 2225e3f

Please sign in to comment.