Skip to content

Commit

Permalink
Merge pull request #249 from lidofinance/feature/si-1583-update-wq-ap…
Browse files Browse the repository at this point in the history
…i-logsgrafana

fix: fixed logs and fallback
  • Loading branch information
Tarens2 authored Sep 3, 2024
2 parents a73a75b + a321aef commit fac0dc4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/waiting-time/waiting-time.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ export class WaitingTimeService {

if (isInPast) {
this.logger.warn(
`Request with id ${request.id} was calculated with finalisation in past (finalizationIn=${finalizationIn}) and going to be recalculated`,
`Request with id ${request.id} was calculated with finalisation in past (finalizationIn=${ms}) and going to be recalculated`,
);
// if calculation wrong points to past then validators is not excited in time
// we need recalculate
Expand All @@ -348,9 +348,10 @@ export class WaitingTimeService {
// temporary fallback for negative results, can be deleted after validator balances computation improvements
if (ms < 0) {
this.logger.warn(
`Request with id ${request.id} was recalculated and finalisation still in points to past (recalculated finalizationIn=${ms}). Fallback to next frame`,
`Request with id ${request.id} was recalculated and finalisation still in past (recalculated finalizationIn=${ms}). Fallback to next frame`,
);
finalizationIn = this.genesisTimeService.timeToWithdrawalFrame(currentFrame + 1, requestTimestamp);
finalizationIn =
this.genesisTimeService.timeToWithdrawalFrame(currentFrame + 1, requestTimestamp) + GAP_AFTER_REPORT;
}

return {
Expand Down

0 comments on commit fac0dc4

Please sign in to comment.