Skip to content

Commit

Permalink
fix: log optimistic timestamp delta
Browse files Browse the repository at this point in the history
  • Loading branch information
doomsower committed Jul 18, 2024
1 parent 5a572b9 commit 5eaa897
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/services/RedstoneServiceV3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,11 @@ export class RedstoneServiceV3 {
// oracle-nodes, which usually work with rounded 10s and 60s intervals
this.#optimisticTimestamp =
10 * Math.floor(Number(block.timestamp) / 10) * 1000;
const delta = Math.ceil(
(new Date().getTime() - this.#optimisticTimestamp) / 1000,
);
this.log.info(
`will use optimistic timestamp: ${this.#optimisticTimestamp}`,
`will use optimistic timestamp: ${this.#optimisticTimestamp} (delta: ${delta}s)`,
);
}
}
Expand Down

0 comments on commit 5eaa897

Please sign in to comment.