From f6bcd362a66f4fd8c515b32cee7bfac5590962f2 Mon Sep 17 00:00:00 2001 From: William Chong Date: Sun, 6 Mar 2022 03:11:45 +0800 Subject: [PATCH] Fix invalid table name on fork recovery --- src/database/sync.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/database/sync.ts b/src/database/sync.ts index d478a04..f66d012 100644 --- a/src/database/sync.ts +++ b/src/database/sync.ts @@ -89,9 +89,8 @@ async function resolveFork(previousBlock: BlockType): Promise { // eslint-disable-next-line @typescript-eslint/no-unused-vars const result = await cassandraClient.execute( `SELECT block_height,block_hash - FROM ${KEYSPACE}.block_height_by_block_hash - WHERE block_height > ${blockQueryResult.rows[0].height.toString()} - ALLOW FILTERING`, + FROM ${KEYSPACE}.block_height_to_hash + WHERE block_height > ${blockQueryResult.rows[0].height.toString()}`, [], { prepare: true } );