Skip to content

Commit a35c203

Browse files
committed
fix: drep activity calculation
1 parent c52f4ba commit a35c203

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ changes.
1616

1717
### Fixed
1818

19-
-
19+
- Fix calculating DRep activity
2020

2121
### Changed
2222

govtool/backend/sql/list-dreps.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ SELECT DISTINCT ON (dh.raw)
4444
encode(va.data_hash, 'hex'),
4545
dr_deposit.deposit,
4646
DRepDistr.amount,
47-
(DRepActivity.epoch_no - GREATEST(MAX(COALESCE(block.epoch_no, block_first_register.epoch_no)), lve.epoch_no)) <= DRepActivity.drep_activity AS active,
47+
(DRepActivity.epoch_no - GREATEST(COALESCE(block.epoch_no, block_first_register.epoch_no), lve.epoch_no, newestRegister.epoch_no)) <= DRepActivity.drep_activity AS active,
4848
encode(dr_voting_anchor.tx_hash, 'hex') AS tx_hash,
4949
newestRegister.time AS last_register_time,
5050
COALESCE(latestDeposit.deposit, 0),

0 commit comments

Comments
 (0)