Skip to content

Commit

Permalink
Merge pull request #96 from cowprotocol/fix_issue_with_order_rewards_…
Browse files Browse the repository at this point in the history
…block_deadline

Add looser block deadline in order rewards query
  • Loading branch information
harisang authored Apr 9, 2024
2 parents b61a891 + 279337e commit 97e9436
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/sql/orderbook/barn_order_rewards.sql
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ order_surplus AS (
ON o.uid = oq.order_uid
WHERE
ss.block_deadline >= {{start_block}}
AND ss.block_deadline <= {{end_block}}
-- since this table filtered on block_deadline is joined with another table filtered on block_number
-- the bound for this table need to be a bit looser.
AND ss.block_deadline <= {{end_block}} + 100
),
order_protocol_fee AS (
SELECT
Expand Down
2 changes: 1 addition & 1 deletion src/sql/orderbook/prod_order_rewards.sql
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ order_surplus AS (
ON o.uid = oq.order_uid
WHERE
ss.block_deadline >= {{start_block}}
AND ss.block_deadline <= {{end_block}}
AND ss.block_deadline <= {{end_block}} + 100
),
order_protocol_fee AS (
SELECT
Expand Down

0 comments on commit 97e9436

Please sign in to comment.