Skip to content
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

refactor: remove dead code #4017

Merged
merged 2 commits into from
Nov 26, 2024
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
8 changes: 0 additions & 8 deletions src/dfx-core/src/config/model/local_server_descriptor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,14 +239,6 @@ impl LocalServerDescriptor {
}
}

pub fn with_replica_port(self, port: u16) -> Self {
let replica = ConfigDefaultsReplica {
port: Some(port),
..self.replica
};
Self { replica, ..self }
}

pub fn with_bitcoin_enabled(self) -> LocalServerDescriptor {
let bitcoin = ConfigDefaultsBitcoin {
enabled: true,
Expand Down
9 changes: 0 additions & 9 deletions src/dfx/src/commands/start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use crate::actors::{
start_shutdown_controller,
};
use crate::config::dfx_version_str;
use crate::error_invalid_argument;
use crate::lib::environment::Environment;
use crate::lib::error::DfxResult;
use crate::lib::info::replica_rev;
Expand Down Expand Up @@ -188,7 +187,6 @@ pub fn exec(
env.get_logger(),
network_descriptor,
host,
None,
enable_bitcoin,
bitcoin_node,
enable_canister_http,
Expand Down Expand Up @@ -495,7 +493,6 @@ pub fn apply_command_line_parameters(
logger: &Logger,
network_descriptor: NetworkDescriptor,
host: Option<String>,
replica_port: Option<String>,
enable_bitcoin: bool,
bitcoin_nodes: Vec<SocketAddr>,
enable_canister_http: bool,
Expand All @@ -520,12 +517,6 @@ pub fn apply_command_line_parameters(
.map_err(|e| anyhow!("Invalid argument: Invalid host: {}", e))?;
local_server_descriptor = local_server_descriptor.with_bind_address(host);
}
if let Some(replica_port) = replica_port {
let replica_port: u16 = replica_port
.parse()
.map_err(|err| error_invalid_argument!("Invalid port number: {}", err))?;
local_server_descriptor = local_server_descriptor.with_replica_port(replica_port);
}
if enable_bitcoin || !bitcoin_nodes.is_empty() {
local_server_descriptor = local_server_descriptor.with_bitcoin_enabled();
}
Expand Down
Loading