Remove old uses of testnet

This commit is contained in:
Paul Hauner
2021-11-11 14:08:56 +11:00
parent 24966c059d
commit eb35c64afd
4 changed files with 22 additions and 22 deletions

View File

@@ -84,8 +84,8 @@ pub fn cli_run<E: EthSpec>(matches: &ArgMatches, env: Environment<E>) -> Result<
Timeouts::set_all(Duration::from_secs(env.eth2_config.spec.seconds_per_slot)),
);
let testnet_config = env
.testnet
let eth2_network_config = env
.eth2_network_config
.clone()
.expect("network should have a valid config");
@@ -95,7 +95,7 @@ pub fn cli_run<E: EthSpec>(matches: &ArgMatches, env: Environment<E>) -> Result<
&client,
&spec,
stdin_inputs,
&testnet_config,
&eth2_network_config,
no_wait,
))?;
@@ -109,11 +109,11 @@ async fn publish_voluntary_exit<E: EthSpec>(
client: &BeaconNodeHttpClient,
spec: &ChainSpec,
stdin_inputs: bool,
testnet_config: &Eth2NetworkConfig,
eth2_network_config: &Eth2NetworkConfig,
no_wait: bool,
) -> Result<(), String> {
let genesis_data = get_geneisis_data(client).await?;
let testnet_genesis_root = testnet_config
let testnet_genesis_root = eth2_network_config
.beacon_state::<E>()
.as_ref()
.expect("network should have valid genesis state")

View File

@@ -82,11 +82,11 @@ pub fn cli_run<T: EthSpec>(
) -> Result<(), String> {
let slashing_protection_db_path = validator_base_dir.join(SLASHING_PROTECTION_FILENAME);
let testnet_config = env
.testnet
let eth2_network_config = env
.eth2_network_config
.ok_or("Unable to get testnet configuration from the environment")?;
let genesis_validators_root = testnet_config
let genesis_validators_root = eth2_network_config
.beacon_state::<T>()
.map(|state: BeaconState<T>| state.genesis_validators_root())
.map_err(|e| {