Skip to content

Commit

Permalink
pindexer: dex-explorer handle sparse block snapshots for summary
Browse files Browse the repository at this point in the history
This looks backwards for the current price and liquidity,
allowing us to handle cases where snapshots are sparse, like on the
testnet.
  • Loading branch information
cronokirby committed Nov 20, 2024
1 parent f794074 commit 0cd1504
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/bin/pindexer/src/dex_ex/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,8 @@ mod summary {
now AS (
SELECT price, liquidity
FROM snapshots
WHERE time >= $3
ORDER BY time ASC
WHERE time <= $3
ORDER BY time DESC
LIMIT 1
),
sums AS (
Expand Down

0 comments on commit 0cd1504

Please sign in to comment.