Skip to content

Commit

Permalink
update latest block query
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fhenneke committed Jan 26, 2024
1 parent 2070073 commit e57b0c5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/sql/orderbook/latest_block.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
select min(block_number) latest
from settlements
where tx_from is null;
select max(block_number) latest
from settlement_observations;

0 comments on commit e57b0c5

Please sign in to comment.