From 8c6af948912a8ecfd508de984eeef555fee07754 Mon Sep 17 00:00:00 2001 From: Igor Sereda Date: Sun, 4 Feb 2024 17:16:49 +0300 Subject: [PATCH] mypy fixes --- src/dipdup/indexes/evm_subsquid_events/index.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/dipdup/indexes/evm_subsquid_events/index.py b/src/dipdup/indexes/evm_subsquid_events/index.py index f7090884d..ec9394751 100644 --- a/src/dipdup/indexes/evm_subsquid_events/index.py +++ b/src/dipdup/indexes/evm_subsquid_events/index.py @@ -153,7 +153,12 @@ async def _synchronize(self, sync_level: int) -> None: topics.add(self.topics[typename][handler.name]) # NOTE: Requesting logs by batches of datasource_config.http.batch_size or NODE_BATCH_SIZE. - batch_size = self.random_node._http_config.batch_size + evm_node: EvmNodeDatasource = self.random_node + if evm_node._http_config: + batch_size = evm_node._http_config.batch_size + else: + batch_size = NODE_BATCH_SIZE + batch_first_level = first_level while batch_first_level <= sync_level: # NOTE: We need block timestamps for each level, so fetch them separately and match with logs.