diff --git a/core/bin/external_node/src/config/mod.rs b/core/bin/external_node/src/config/mod.rs index ed0ea50cdc04..46b97550483b 100644 --- a/core/bin/external_node/src/config/mod.rs +++ b/core/bin/external_node/src/config/mod.rs @@ -4,6 +4,7 @@ use anyhow::Context; use serde::Deserialize; use url::Url; use zksync_basic_types::{Address, L1ChainId, L2ChainId}; +use zksync_config::{configs::chain::L1BatchCommitDataGeneratorMode, ObjectStoreConfig}; use zksync_consensus_roles::node; use zksync_core::{ api_server::{ @@ -19,8 +20,6 @@ use zksync_web3_decl::{ namespaces::{EthNamespaceClient, ZksNamespaceClient}, }; -use zksync_config::{configs::chain::L1BatchCommitDataGeneratorMode, ObjectStoreConfig}; - #[cfg(test)] mod tests; diff --git a/core/bin/external_node/src/config/tests.rs b/core/bin/external_node/src/config/tests.rs index 243be39a1139..8eb9792b8eee 100644 --- a/core/bin/external_node/src/config/tests.rs +++ b/core/bin/external_node/src/config/tests.rs @@ -25,6 +25,10 @@ fn parsing_optional_config_from_empty_env() { 128 * BYTES_IN_MEGABYTE ); assert_eq!(config.max_response_body_size(), 10 * BYTES_IN_MEGABYTE); + assert_eq!( + config.l1_batch_commit_data_generator_mode, + L1BatchCommitDataGeneratorMode::Rollup + ); } #[test] @@ -44,6 +48,7 @@ fn parsing_optional_config_from_env() { ("EN_MERKLE_TREE_MULTI_GET_CHUNK_SIZE", "1000"), ("EN_MERKLE_TREE_BLOCK_CACHE_SIZE_MB", "32"), ("EN_MAX_RESPONSE_BODY_SIZE_MB", "1"), + ("EN_L1_BATCH_COMMIT_DATA_GENERATOR_MODE", "Validium"), ]; let env_vars = env_vars .into_iter() @@ -70,4 +75,8 @@ fn parsing_optional_config_from_env() { 32 * BYTES_IN_MEGABYTE ); assert_eq!(config.max_response_body_size(), BYTES_IN_MEGABYTE); + assert_eq!( + config.l1_batch_commit_data_generator_mode, + L1BatchCommitDataGeneratorMode::Validium + ); }