Skip to content

Commit

Permalink
fix(txs/pools_updates): select only distinct certs
Browse files Browse the repository at this point in the history
  • Loading branch information
mmahut committed Aug 22, 2024
1 parent fd2c03f commit 6dda08e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sql/txs/txs_hash_pool_updates.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SELECT pu.id AS "pu_id",
SELECT DISTINCT pu.id AS "pu_id",
pu.cert_index AS "cert_index",
encode(pu.vrf_key_hash, 'hex') AS "vrf_key",
pu.pledge::TEXT AS "pledge", -- cast to TEXT to avoid number overflow
Expand Down Expand Up @@ -29,4 +29,4 @@ FROM tx
LEFT JOIN pool_metadata_ref pmr ON (pmr.id = pu.meta_id)
LEFT JOIN off_chain_pool_data pod ON (pmr.hash = pod.hash)
WHERE encode(tx.hash, 'hex') = $1
ORDER BY pu.cert_index ASC
ORDER BY pu.cert_index ASC;

0 comments on commit 6dda08e

Please sign in to comment.