-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2406 from IntersectMBO/fix/fix-ada-holder-voting-…
…power fix: fix ada holder voting power calculation
- Loading branch information
Showing
2 changed files
with
3 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,6 @@ | ||
SELECT COALESCE(SUM(utxo_view.value::numeric), 0) + COALESCE(reward_sum.total_reward, 0) AS total_value, | ||
SELECT COALESCE(SUM(utxo_view.value::numeric), 0), | ||
encode(stake_address.hash_raw, 'hex') | ||
FROM stake_address | ||
JOIN utxo_view ON utxo_view.stake_address_id = stake_address.id | ||
LEFT JOIN ( | ||
SELECT addr_id, SUM(reward_rest.amount) AS total_reward | ||
FROM reward_rest | ||
GROUP BY addr_id | ||
) AS reward_sum ON reward_sum.addr_id = stake_address.id | ||
WHERE stake_address.hash_raw = decode(?, 'hex') | ||
GROUP BY stake_address.hash_raw, reward_sum.total_reward; | ||
GROUP BY stake_address.hash_raw; |