-
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.
fix(#1960): make calculation of the DRep voting power on the backend
- Loading branch information
1 parent
d113332
commit 8fb4e5e
Showing
2 changed files
with
7 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,7 +1,6 @@ | ||
select coalesce(drep_distr.amount, 0) as amount | ||
from drep_hash | ||
left join drep_distr | ||
on drep_hash.id = drep_distr.hash_id | ||
where drep_hash.raw = decode(?,'hex') | ||
order by epoch_no desc | ||
limit 1 | ||
select sum(uv.value) as amount | ||
from utxo_view uv | ||
join delegation_vote dv on uv.stake_address_id = dv.addr_id | ||
join drep_hash dh on dv.drep_hash_id = dh.id | ||
where dh.raw = decode(?,'hex') | ||
and dv.cert_index != 0 |