Skip to content

chore(starknet_sequencer_node): remove redundant lifetime generics #5031

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
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
20 changes: 10 additions & 10 deletions crates/starknet_sequencer_node/src/deployment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,30 @@ use crate::config::component_execution_config::{

const BASE_PORT: u16 = 55000; // TODO(Tsabary): arbitrary port, need to resolve.

pub struct DeploymentAndPreset<'a> {
pub deployment: Deployment<'a>,
pub struct DeploymentAndPreset {
pub deployment: Deployment,
pub dump_file_path: &'static str,
}

impl<'a> DeploymentAndPreset<'a> {
pub fn new(deployment: Deployment<'a>, dump_file_path: &'static str) -> Self {
impl DeploymentAndPreset {
pub fn new(deployment: Deployment, dump_file_path: &'static str) -> Self {
Self { deployment, dump_file_path }
}
}

#[derive(Clone, Debug, PartialEq, Serialize)]
pub struct Deployment<'a> {
pub struct Deployment {
chain_id: ChainId,
image: &'a str,
application_config_subdir: &'a str,
image: &'static str,
application_config_subdir: &'static str,
services: Vec<Service>,
}

impl<'a> Deployment<'a> {
impl Deployment {
pub fn new(
chain_id: ChainId,
image: &'a str,
application_config_subdir: &'a str,
image: &'static str,
application_config_subdir: &'static str,
deployment_name: DeploymentName,
) -> Self {
let service_names = deployment_name.all_service_names();
Expand Down
6 changes: 3 additions & 3 deletions crates/starknet_sequencer_node/src/deployment_definitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ pub const SINGLE_NODE_CONFIG_PATH: &str =

// TODO(Tsabary): fill and order these.

type DeploymentFn = fn() -> DeploymentAndPreset<'static>;
type DeploymentFn = fn() -> DeploymentAndPreset;

pub const DEPLOYMENTS: &[DeploymentFn] = &[create_main_deployment, create_testing_deployment];

fn create_main_deployment() -> DeploymentAndPreset<'static> {
fn create_main_deployment() -> DeploymentAndPreset {
DeploymentAndPreset::new(
Deployment::new(
ChainId::Mainnet,
Expand All @@ -32,7 +32,7 @@ fn create_main_deployment() -> DeploymentAndPreset<'static> {
)
}

fn create_testing_deployment() -> DeploymentAndPreset<'static> {
fn create_testing_deployment() -> DeploymentAndPreset {
DeploymentAndPreset::new(
Deployment::new(
ChainId::IntegrationSepolia,
Expand Down
Loading