Add to start_recover.

This commit is contained in:
Peilun Li 2024-01-17 10:57:07 +08:00
parent e236c2f70a
commit 986bfa412c

View File

@ -71,6 +71,7 @@ impl LogEntryFetcher {
.submit_filter() .submit_filter()
.from_block(progress) .from_block(progress)
.to_block(end_block_number) .to_block(end_block_number)
.address(contract.address().into())
.filter; .filter;
let mut stream = LogQuery::new(&provider, &filter, log_query_delay) let mut stream = LogQuery::new(&provider, &filter, log_query_delay)
.with_page_size(log_page_size); .with_page_size(log_page_size);
@ -116,7 +117,7 @@ impl LogEntryFetcher {
} }
Err(e) => { Err(e) => {
error!("log query error: e={:?}", e); error!("log query error: e={:?}", e);
filter = filter.from_block(progress); filter = filter.from_block(progress).address(contract.address());
stream = LogQuery::new(&provider, &filter, log_query_delay) stream = LogQuery::new(&provider, &filter, log_query_delay)
.with_page_size(log_page_size); .with_page_size(log_page_size);
tokio::time::sleep(Duration::from_millis(RETRY_WAIT_MS)).await; tokio::time::sleep(Duration::from_millis(RETRY_WAIT_MS)).await;