Skip to content

Commit a321aef

Browse files
committed
fix: fixed logs and fallback
1 parent 798be29 commit a321aef

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/waiting-time/waiting-time.service.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ export class WaitingTimeService {
329329

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

356357
return {

0 commit comments

Comments
 (0)