Skip to content
This repository was archived by the owner on Dec 20, 2024. It is now read-only.

Commit ce33b76

Browse files
authored
[EASY] Fix outdated comment (#113)
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).
1 parent 128919a commit ce33b76

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/sql/orderbook/barn_batch_rewards.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ order_surplus AS (
8787
JOIN settlement_scores ss -- contains block_deadline
8888
ON s.auction_id = ss.auction_id
8989
JOIN trades t -- contains traded amounts
90-
ON s.block_number = t.block_number -- log_index cannot be checked, does not work correctly with multiple auctions on the same block
90+
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
9191
JOIN order_data od -- contains tokens and limit amounts
9292
ON t.order_uid = od.uid
9393
JOIN order_execution oe -- contains surplus fee

src/sql/orderbook/prod_batch_rewards.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ order_surplus AS (
8787
JOIN settlement_scores ss -- contains block_deadline
8888
ON s.auction_id = ss.auction_id
8989
JOIN trades t -- contains traded amounts
90-
ON s.block_number = t.block_number -- log_index cannot be checked, does not work correctly with multiple auctions on the same block
90+
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
9191
JOIN order_data od -- contains tokens and limit amounts
9292
ON t.order_uid = od.uid
9393
JOIN order_execution oe -- contains surplus fee

0 commit comments

Comments
 (0)