Skip to content

Commit

Permalink
fix(eth-watch): add missing check that from_block is not larger than …
Browse files Browse the repository at this point in the history
…finalized_block (#2969)

Signed-off-by: tomg10 <[email protected]>
  • Loading branch information
tomg10 authored Sep 26, 2024
1 parent 191e81a commit 3f406c7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/node/eth_watch/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ impl EthWatch {
.await
.map_err(DalError::generalize)?;

// There are no new blocks so there is nothing to be done
if from_block > finalized_block {
continue;
}
let processor_events = client
.get_events(
Web3BlockNumber::Number(from_block.into()),
Expand Down

0 comments on commit 3f406c7

Please sign in to comment.