Skip to content

Commit

Permalink
fix: use full index for block tx index
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelcr committed Jun 1, 2024
1 parent 7461667 commit c1784b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pg/pg-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export class PgStore extends BasePgStore {
SELECT
i.genesis_id, i.number, i.ordinal_number, li.block_height, li.block_hash, li.tx_index,
(
ROW_NUMBER() OVER (ORDER BY li.tx_index ASC) + (SELECT COALESCE(max, -1) FROM prev_transfer_index)
ROW_NUMBER() OVER (ORDER BY li.block_height ASC, li.tx_index ASC) + (SELECT COALESCE(max, -1) FROM prev_transfer_index)
) AS block_transfer_index
FROM inscriptions AS i
INNER JOIN location_inserts AS li ON li.ordinal_number = i.ordinal_number
Expand Down

0 comments on commit c1784b9

Please sign in to comment.