From 099220da82a1149f8f3b310a7a9181e08686b5e0 Mon Sep 17 00:00:00 2001 From: Morgan Mccauley Date: Mon, 6 Nov 2023 16:09:01 +1300 Subject: [PATCH] refactor: Remove `Opts` reference from historical backfill --- .../queryapi_coordinator/src/historical_block_processing.rs | 5 ----- .../src/historical_block_processing_integration_tests.rs | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/indexer/queryapi_coordinator/src/historical_block_processing.rs b/indexer/queryapi_coordinator/src/historical_block_processing.rs index cae2a7793..ddbefae19 100644 --- a/indexer/queryapi_coordinator/src/historical_block_processing.rs +++ b/indexer/queryapi_coordinator/src/historical_block_processing.rs @@ -1,5 +1,4 @@ use crate::indexer_types::IndexerFunction; -use crate::opts::{Opts, Parser}; use crate::s3; use anyhow::{bail, Context}; use aws_sdk_s3::Client as S3Client; @@ -37,7 +36,6 @@ pub fn spawn_historical_message_thread( process_historical_messages_or_handle_error( block_height, new_indexer_function_copy, - Opts::parse(), &redis_connection_manager, &s3_client, &chain_id, @@ -51,7 +49,6 @@ pub fn spawn_historical_message_thread( pub(crate) async fn process_historical_messages_or_handle_error( block_height: BlockHeight, indexer_function: IndexerFunction, - opts: Opts, redis_connection_manager: &storage::ConnectionManager, s3_client: &S3Client, chain_id: &ChainId, @@ -60,7 +57,6 @@ pub(crate) async fn process_historical_messages_or_handle_error( match process_historical_messages( block_height, indexer_function, - opts, redis_connection_manager, s3_client, chain_id, @@ -83,7 +79,6 @@ pub(crate) async fn process_historical_messages_or_handle_error( pub(crate) async fn process_historical_messages( block_height: BlockHeight, indexer_function: IndexerFunction, - opts: Opts, redis_connection_manager: &storage::ConnectionManager, s3_client: &S3Client, chain_id: &ChainId, diff --git a/indexer/queryapi_coordinator/src/historical_block_processing_integration_tests.rs b/indexer/queryapi_coordinator/src/historical_block_processing_integration_tests.rs index 31310d720..f9b94185f 100644 --- a/indexer/queryapi_coordinator/src/historical_block_processing_integration_tests.rs +++ b/indexer/queryapi_coordinator/src/historical_block_processing_integration_tests.rs @@ -95,9 +95,9 @@ mod tests { let result = historical_block_processing::process_historical_messages( fake_block_height + 1, indexer_function, - opts, &redis_connection_manager, &s3_client, + &opts.chain_id(), &json_rpc_client, ) .await;