Skip to content

Commit

Permalink
Do not care about current epoch data for the history endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
hodlonaut committed May 17, 2024
1 parent cb93336 commit 8e508b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/grest/rpc/pool/pool_history.sql
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ BEGIN
UNION

SELECT epoch_no, active_stake::text, active_stake_pct, saturation_pct, block_cnt, delegator_cnt, margin, fixed_cost::text, pool_fees::text, deleg_rewards::text, member_rewards::text, epoch_ros
from grest.get_pool_history_data_bulk(_curr_epoch - 2, ARRAY[_pool_bech32], _curr_epoch) -- pass in current epoch explicitly to avoid future epoch row being returned
from grest.get_pool_history_data_bulk(_curr_epoch - 2, ARRAY[_pool_bech32], _curr_epoch - 1) -- do not care about current or future epochs for history endpoint

) x
WHERE (_epoch_no is null or x.epoch_no = _epoch_no)
Expand Down

0 comments on commit 8e508b2

Please sign in to comment.