From 4a7a9fb67a2ea7fff661bc8fb85b6da3e9c65b9c Mon Sep 17 00:00:00 2001 From: Itay Tsabary Date: Mon, 9 Dec 2024 10:09:25 +0200 Subject: [PATCH] chore(starknet_sequencer_node): add active component execution config commit-id:794b2125 --- .../src/config/component_execution_config.rs | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/crates/starknet_sequencer_node/src/config/component_execution_config.rs b/crates/starknet_sequencer_node/src/config/component_execution_config.rs index ca3bd2eb2f..1757c8b1f6 100644 --- a/crates/starknet_sequencer_node/src/config/component_execution_config.rs +++ b/crates/starknet_sequencer_node/src/config/component_execution_config.rs @@ -69,6 +69,29 @@ impl Default for ReactiveComponentExecutionConfig { } } +/// Active component configuration. +#[derive(Clone, Debug, Serialize, Deserialize, Validate, PartialEq)] +pub struct ActiveComponentExecutionConfig { + pub execution_mode: ActiveComponentExecutionMode, +} + +impl SerializeConfig for ActiveComponentExecutionConfig { + fn dump(&self) -> BTreeMap { + BTreeMap::from_iter([ser_param( + "execution_mode", + &self.execution_mode, + "The component execution mode.", + ParamPrivacyInput::Public, + )]) + } +} + +impl Default for ActiveComponentExecutionConfig { + fn default() -> Self { + Self { execution_mode: ActiveComponentExecutionMode::Enabled } + } +} + /// Specific components default configurations. impl ReactiveComponentExecutionConfig { pub fn gateway_default_config() -> Self {