Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix(eth-sender): fix query returning inflight txs (matter-labs#2404)
Browse files Browse the repository at this point in the history
This fixes issue that we may return not-yet-sent transactions as
in-flight (it's been broken since we added support for blobs :/ )
because max(eth_txs_id) counts transactions from all operators not just
one

Signed-off-by: tomg10 <[email protected]>
  • Loading branch information
tomg10 authored Jul 8, 2024
1 parent 312defe commit 6a89ca0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion core/lib/dal/src/eth_sender_dal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ impl EthSenderDal<'_, '_> {
COALESCE(MAX(eth_tx_id), 0)
FROM
eth_txs_history
JOIN eth_txs ON eth_txs.id = eth_txs_history.eth_tx_id
WHERE
sent_at_block IS NOT NULL
eth_txs_history.sent_at_block IS NOT NULL
AND eth_txs.from_addr IS NOT DISTINCT FROM $1
)
ORDER BY
id
Expand Down

0 comments on commit 6a89ca0

Please sign in to comment.