From 0f2d4d7655d9f086e4dcf5973fdf30e7465ac8f6 Mon Sep 17 00:00:00 2001 From: doomsower <12031673+doomsower@users.noreply.github.com> Date: Mon, 22 Jul 2024 14:32:44 -0500 Subject: [PATCH] fix: redstone delta --- src/services/RedstoneServiceV3.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/RedstoneServiceV3.ts b/src/services/RedstoneServiceV3.ts index 67d9888..37b79c5 100644 --- a/src/services/RedstoneServiceV3.ts +++ b/src/services/RedstoneServiceV3.ts @@ -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)`, );