Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

chore: run tce only if there is tce config #379

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions crates/topos/src/components/node/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,15 @@ pub(crate) async fn handle_command(

// TCE
if config.base.subnet == "topos" {
info!("Running topos TCE service...",);
processes.push(services::process::spawn_tce_process(
config.tce.clone().unwrap(),
keys,
genesis,
(shutdown_token.clone(), shutdown_sender.clone()),
));
if let Some(tce_config) = config.tce {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove the unwrap and fail more gracefully, but we still need to fail.

info!("Running topos TCE service...",);
processes.push(services::process::spawn_tce_process(
tce_config,
keys,
genesis,
(shutdown_token.clone(), shutdown_sender.clone()),
));
}
}

drop(shutdown_sender);
Expand Down
Loading