Skip to content

Commit fb47d04

Browse files
committed
comment
1 parent 0a91904 commit fb47d04

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

govtool/backend/sql/get-network-total-stake.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ TotalStakeControlledByActiveDReps AS (
6767
AND COALESCE(rd.deposit, 0) >= 0
6868
AND ((DRepActivity.epoch_no - GREATEST(COALESCE(lve.epoch_no, 0), COALESCE(rd.epoch_no, 0))) <= DRepActivity.drep_activity)
6969
),
70+
-- This CTE retrieves the latest pool statistics for each pool in the current epoch.
71+
-- It ensures that we only consider the most recent data for each pool.
72+
-- it's a hotfix for duplication issue https://github.com/IntersectMBO/cardano-db-sync/issues/1986
7073
LatestPoolStat AS (
7174
SELECT DISTINCT ON (pool_hash_id, epoch_no, number_of_blocks, number_of_delegators, stake, voting_power)
7275
*

0 commit comments

Comments
 (0)