From deaa413e6fac7bdb8f06574a8b2e652c2b8055c7 Mon Sep 17 00:00:00 2001 From: incrypto32 Date: Thu, 5 Sep 2024 13:36:53 +0530 Subject: [PATCH] chain/ethereum: bump block range size for composed subgraphs --- chain/ethereum/src/chain.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/chain/ethereum/src/chain.rs b/chain/ethereum/src/chain.rs index 49658481178..c55a3ebaf77 100644 --- a/chain/ethereum/src/chain.rs +++ b/chain/ethereum/src/chain.rs @@ -204,6 +204,12 @@ impl BlockStreamBuilder for EthereumStreamBuilder { ), }; + let max_block_range_size = if is_using_subgraph_composition { + ENV_VARS.max_block_range_size * 10 + } else { + ENV_VARS.max_block_range_size + }; + Ok(Box::new(PollingBlockStream::new( chain_store, chain_head_update_stream, @@ -214,7 +220,7 @@ impl BlockStreamBuilder for EthereumStreamBuilder { start_blocks, reorg_threshold, logger, - ENV_VARS.max_block_range_size, + max_block_range_size, ENV_VARS.target_triggers_per_block_range, unified_api_version, subgraph_current_block,