You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove the FINAL clause from multiple SELECT queries in internal/libs/clickhouse.go. Affected functions: GetTransactionMismatchRangeFromClickHouseV2, GetLogsMismatchRangeFromClickHouseV2, getBlocksFromV2, getTransactionsFromV2, getLogsFromV2, and getTracesFromV2. Queries now read directly from the respective tables (blocks, transactions, logs, traces) without the FINAL modifier.
// Aggregate transaction counts per block from the transactions table.
417
417
query:=fmt.Sprintf(
418
-
"SELECT block_number, count() AS tx_count FROM %s.transactions FINAL WHERE chain_id = %d AND block_number BETWEEN %d AND %d GROUP BY block_number ORDER BY block_number",
418
+
"SELECT block_number, count() AS tx_count FROM %s.transactions WHERE chain_id = %d AND block_number BETWEEN %d AND %d GROUP BY block_number ORDER BY block_number",
// Aggregate log counts and max log_index per block from the logs table.
494
494
query:=fmt.Sprintf(
495
-
"SELECT block_number, count() AS log_count, max(log_index) AS max_log_index FROM %s.logs FINAL WHERE chain_id = %d AND block_number BETWEEN %d AND %d GROUP BY block_number ORDER BY block_number",
495
+
"SELECT block_number, count() AS log_count, max(log_index) AS max_log_index FROM %s.logs WHERE chain_id = %d AND block_number BETWEEN %d AND %d GROUP BY block_number ORDER BY block_number",
query:=fmt.Sprintf("SELECT %s FROM %s.transactions FINAL WHERE chain_id = %d AND block_number BETWEEN %d AND %d order by block_number, transaction_index",
592
+
query:=fmt.Sprintf("SELECT %s FROM %s.transactions WHERE chain_id = %d AND block_number BETWEEN %d AND %d order by block_number, transaction_index",
0 commit comments