From b40b243379edb7be796e6ca6b60ed9ffb9584870 Mon Sep 17 00:00:00 2001 From: Noah Saso Date: Mon, 25 Sep 2023 15:43:06 -0700 Subject: [PATCH] Fixed again. --- src/server/routes/indexer/computer.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/server/routes/indexer/computer.ts b/src/server/routes/indexer/computer.ts index cd956231..4506bba4 100644 --- a/src/server/routes/indexer/computer.ts +++ b/src/server/routes/indexer/computer.ts @@ -340,6 +340,7 @@ export const computer: Router.Middleware = async (ctx) => { await WasmStateEvent.findOne({ where: { blockTimeUnixMs: { + [Op.gt]: 0, [Op.lte]: time, }, }, @@ -363,13 +364,14 @@ export const computer: Router.Middleware = async (ctx) => { await WasmStateEvent.findOne({ where: { blockTimeUnixMs: { + [Op.gt]: 0, [Op.lte]: times[0], }, }, order: [['blockTimeUnixMs', 'DESC']], }) )?.block ?? - // Use first block with a time set if no event exists before start time. + // Use first block if no event exists before start time. ( await WasmStateEvent.findOne({ where: { @@ -386,6 +388,7 @@ export const computer: Router.Middleware = async (ctx) => { await WasmStateEvent.findOne({ where: { blockTimeUnixMs: { + [Op.gt]: 0, [Op.lte]: times[1], }, },