Skip to content

Commit

Permalink
chore(starknet_sequencer_node): add active component execution config
Browse files Browse the repository at this point in the history
commit-id:794b2125
  • Loading branch information
Itay-Tsabary-Starkware committed Dec 9, 2024
1 parent 167b6e3 commit 4a7a9fb
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<ParamPath, SerializedParam> {
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 {
Expand Down

0 comments on commit 4a7a9fb

Please sign in to comment.