Skip to content

Commit

Permalink
[EASY] Fix outdated comment (#113)
Browse files Browse the repository at this point in the history
This PR edits a comment that was outdated and led to some confusion
about whether the code can properly handle multiple txs from the same
environment in the same block (the answer is that it indeed handles them
properly).

Identical PR in the solver rewards repo
[here](cowprotocol/solver-rewards#402).
  • Loading branch information
harisang authored Sep 27, 2024
1 parent 128919a commit ce33b76
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/sql/orderbook/barn_batch_rewards.sql
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ order_surplus AS (
JOIN settlement_scores ss -- contains block_deadline
ON s.auction_id = ss.auction_id
JOIN trades t -- contains traded amounts
ON s.block_number = t.block_number -- log_index cannot be checked, does not work correctly with multiple auctions on the same block
ON s.block_number = t.block_number -- given the join that follows with the order execution table, this works even when multiple txs appear in the same block
JOIN order_data od -- contains tokens and limit amounts
ON t.order_uid = od.uid
JOIN order_execution oe -- contains surplus fee
Expand Down
2 changes: 1 addition & 1 deletion src/sql/orderbook/prod_batch_rewards.sql
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ order_surplus AS (
JOIN settlement_scores ss -- contains block_deadline
ON s.auction_id = ss.auction_id
JOIN trades t -- contains traded amounts
ON s.block_number = t.block_number -- log_index cannot be checked, does not work correctly with multiple auctions on the same block
ON s.block_number = t.block_number -- given the join that follows with the order execution table, this works even when multiple txs appear in the same block
JOIN order_data od -- contains tokens and limit amounts
ON t.order_uid = od.uid
JOIN order_execution oe -- contains surplus fee
Expand Down

0 comments on commit ce33b76

Please sign in to comment.