Skip to content

Commit

Permalink
If proposal is hard fork initiation, use original total SPO voting po…
Browse files Browse the repository at this point in the history
…wer calculation, otherwise use just voted pool power sum as total
  • Loading branch information
gregbgithub committed Sep 17, 2024
1 parent 469f05c commit 386de6a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions files/grest/rpc/governance/proposal_voting_summary.sql
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ BEGIN
SUM(voting_power) AS tot_pool_power
FROM proposal_epoch_data AS ped
INNER JOIN pool_stat ON pool_stat.epoch_no = ped.epoch_of_interest
-- if hard fork initiation, then need to use full SPO voting power otherwise just voted SPO power
WHERE ((ped.proposal_type = 'HardForkInitiation') or EXISTS (SELECT 1 FROM latest_votes vp where vp.voter_role = 'SPO'
AND vp.gov_action_proposal_id = ped.gov_action_proposal_id AND vp.pool_voter = pool_stat.pool_hash_id))
GROUP BY ped.gov_action_proposal_id, pool_stat.epoch_no
),
active_prop_pool_votes AS (
Expand Down

0 comments on commit 386de6a

Please sign in to comment.