Skip to content

Commit

Permalink
fix: log on reporter error
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-bisonai committed Dec 9, 2024
1 parent 85d117a commit 89616da
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions node/pkg/reporter/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ func (r *Reporter) report(ctx context.Context, pairs map[string]SubmissionData)
}

if utils.IsNonceError(err) || errors.Is(err, context.DeadlineExceeded) {
log.Debug().Err(err).Str("Player", "Reporter").Msg("should refresh nonce")
shouldRefreshNonce = true
}
}
Expand All @@ -164,12 +165,13 @@ func (r *Reporter) report(ctx context.Context, pairs map[string]SubmissionData)
r.LatestSubmittedDataMap.Store(pair, values[i].Int64())
}

log.Debug().Str("Player", "Reporter").Msgf("reporting done for reporter with interval: %v", r.SubmissionInterval)

if shouldRefreshNonce {
log.Debug().Str("Player", "Reporter").Msg("refreshing nonce pool")
return r.KaiaHelper.FlushNoncePool(ctx)
}

log.Debug().Str("Player", "Reporter").Msgf("reporting done for reporter with interval: %v", r.SubmissionInterval)

return nil
}

Expand Down

0 comments on commit 89616da

Please sign in to comment.