Skip to content

Commit

Permalink
Add a restriction for delegators not in SDC to be limited to only new…
Browse files Browse the repository at this point in the history
… delegations (assuming older ones are in cache)
  • Loading branch information
rdlrt committed Nov 30, 2024
1 parent fb15db5 commit a58c11c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions files/grest/rpc/pool/pool_delegators.sql
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ BEGIN
AND NOT EXISTS (SELECT null FROM stake_deregistration AS sd WHERE sd.addr_id = d.addr_id AND sd.tx_id > d.tx_id)
-- AND NOT grest.is_dangling_delegation(d.id)
AND NOT EXISTS (SELECT null FROM grest.stake_distribution_cache AS sdc WHERE sdc.stake_address_id = sa.id)
WHERE d.active_epoch_no > (SELECT MAX(no) FROM epoch)
) z,
LATERAL grest.account_utxos(array[(SELECT grest.cip5_hex_to_stake_addr(z.stake_address_raw))], false) AS acc_info
GROUP BY
Expand Down

0 comments on commit a58c11c

Please sign in to comment.