remove optional_eth2_network_config
(#4611)
It seems the passed [`optional_config`](dfcb3363c7/lighthouse/src/main.rs (L515)
) is always `Some` instead of `None`.
This commit is contained in:
parent
501ce62d7c
commit
fa93b58257
@ -344,18 +344,6 @@ impl<E: EthSpec> EnvironmentBuilder<E> {
|
||||
Ok(self)
|
||||
}
|
||||
|
||||
/// Optionally adds a network configuration to the environment.
|
||||
pub fn optional_eth2_network_config(
|
||||
self,
|
||||
optional_config: Option<Eth2NetworkConfig>,
|
||||
) -> Result<Self, String> {
|
||||
if let Some(config) = optional_config {
|
||||
self.eth2_network_config(config)
|
||||
} else {
|
||||
Ok(self)
|
||||
}
|
||||
}
|
||||
|
||||
/// Consumes the builder, returning an `Environment`.
|
||||
pub fn build(self) -> Result<Environment<E>, String> {
|
||||
let (signal, exit) = exit_future::signal();
|
||||
|
@ -513,7 +513,7 @@ fn run<E: EthSpec>(
|
||||
|
||||
let mut environment = builder
|
||||
.multi_threaded_tokio_runtime()?
|
||||
.optional_eth2_network_config(Some(eth2_network_config))?
|
||||
.eth2_network_config(eth2_network_config)?
|
||||
.build()?;
|
||||
|
||||
let log = environment.core_context().log().clone();
|
||||
|
Loading…
Reference in New Issue
Block a user