diff --git a/orchestrator/orchestrator/src/ethereum_event_watcher.rs b/orchestrator/orchestrator/src/ethereum_event_watcher.rs index 60b289e7f..fe681b5ab 100644 --- a/orchestrator/orchestrator/src/ethereum_event_watcher.rs +++ b/orchestrator/orchestrator/src/ethereum_event_watcher.rs @@ -42,7 +42,7 @@ pub async fn check_for_events( let prefix = contact.get_prefix(); let our_cosmos_address = cosmos_key.to_address(&prefix).unwrap(); let latest_block = get_block_number_with_retry(eth_client.clone()).await; - let latest_block = latest_block - block_delay; + let latest_block = latest_block.saturating_sub(block_delay); let mut ending_block = starting_block + blocks_to_search; if ending_block > latest_block { @@ -72,6 +72,8 @@ pub async fn check_for_events( let search_range = starting_block..ending_block; + info!("check_for_events from {:?} to {:?}", starting_block, ending_block); + // select uses an inclusive version of the range erc20_deployed_filter = erc20_deployed_filter.select(search_range.clone()); logic_call_filter = logic_call_filter.select(search_range.clone());