From a58c11c8ae340f1401126319055c7358af88c0d6 Mon Sep 17 00:00:00 2001 From: rdlrt <3169068+rdlrt@users.noreply.github.com> Date: Sat, 30 Nov 2024 17:10:45 +1100 Subject: [PATCH] Add a restriction for delegators not in SDC to be limited to only new delegations (assuming older ones are in cache) --- files/grest/rpc/pool/pool_delegators.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/files/grest/rpc/pool/pool_delegators.sql b/files/grest/rpc/pool/pool_delegators.sql index bd67bc67..a3504c45 100644 --- a/files/grest/rpc/pool/pool_delegators.sql +++ b/files/grest/rpc/pool/pool_delegators.sql @@ -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