Skip to content

Commit

Permalink
fix: redstone delta
Browse files Browse the repository at this point in the history
  • Loading branch information
doomsower committed Jul 22, 2024
1 parent b029164 commit 0f2d4d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/RedstoneServiceV3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export class RedstoneServiceV3 {
const anvilTs = 10 * Math.floor(Number(block.timestamp) / 10) * 1000;
const fromNowTs = 10_000 * Math.floor(now / 10_000 - 10_000);
this.#optimisticTimestamp = Math.min(anvilTs, fromNowTs);
const delta = Math.ceil((now - this.#optimisticTimestamp) / 1000);
const delta = Math.floor(now / 1000) - this.#optimisticTimestamp;
this.log.info(
`will use optimistic timestamp: ${this.#optimisticTimestamp} (delta: ${delta}s)`,
);
Expand Down

0 comments on commit 0f2d4d7

Please sign in to comment.