From e57b0c5ffe1c5c52b5f32bf6084587ac5ca5a5e2 Mon Sep 17 00:00:00 2001 From: Felix Henneke Date: Fri, 26 Jan 2024 20:06:43 +0100 Subject: [PATCH] update latest block query the format of the settlements table will be changed. instead of looking at the earlies block without some transaction data we now look at the latest block with settlement observations this should work with both the new and old format of the settlements table --- src/sql/orderbook/latest_block.sql | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/sql/orderbook/latest_block.sql b/src/sql/orderbook/latest_block.sql index acc3a5d4..6bb1a1b5 100644 --- a/src/sql/orderbook/latest_block.sql +++ b/src/sql/orderbook/latest_block.sql @@ -1,3 +1,2 @@ -select min(block_number) latest -from settlements -where tx_from is null; \ No newline at end of file +select max(block_number) latest +from settlement_observations;