Skip to content

Commit

Permalink
refactor: remove dead code (#4017)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericswanson-dfinity authored Nov 26, 2024
1 parent 8307f69 commit 3200e13
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
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

0 comments on commit 3200e13

Please sign in to comment.