Skip to content

Commit

Permalink
fix: special dreps are not retired
Browse files Browse the repository at this point in the history
  • Loading branch information
slowbackspace committed Jan 16, 2025
1 parent 161895a commit 07cef8e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sql/governance/dreps_drep_id.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ calculated_active AS (
CASE
-- REGISTERED IF THE LATEST REGISTRATION IS AFTER THE LATEST DEREGISTRATION
WHEN (
SELECT MAX(dr.tx_id)
-- Special dreps have no drep_registration records, fallback to TRUE for these
SELECT COALESCE(MAX(dr.tx_id), 1)
FROM drep_registration dr
WHERE dr.drep_hash_id = dh.id AND dr.deposit > 0
) > (
Expand Down

0 comments on commit 07cef8e

Please sign in to comment.