Skip to content

Commit

Permalink
Remove get_consensus_port
Browse files Browse the repository at this point in the history
  • Loading branch information
matias-gonz committed Sep 27, 2024
1 parent 212f68c commit 92f3ec6
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions zk_toolbox/crates/config/src/general.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use zksync_protobuf_config::{decode_yaml_repr, encode_yaml_repr};
use crate::{
consts::GENERAL_FILE,
traits::{ConfigWithL2RpcUrl, FileConfigWithDefaultName, ReadConfig, SaveConfig},
ChainConfig, DEFAULT_CONSENSUS_PORT,
ChainConfig,
};

pub struct RocksDbs {
Expand Down Expand Up @@ -113,14 +113,6 @@ pub fn set_file_artifacts(config: &mut GeneralConfig, file_artifacts: FileArtifa
set_artifact_path!(config.core_object_store, file_artifacts.core_object_store);
}

pub fn get_consensus_port(config: &GeneralConfig) -> u16 {
config
.consensus_config
.as_ref()
.map(|c| c.server_addr.port())
.unwrap_or(DEFAULT_CONSENSUS_PORT)
}

pub fn override_config(shell: &Shell, path: PathBuf, chain: &ChainConfig) -> anyhow::Result<()> {
let chain_config_path = chain.path_to_general_config();
let override_config = serde_yaml::from_str(&shell.read_file(path)?)?;
Expand Down

0 comments on commit 92f3ec6

Please sign in to comment.