From 784997b09bc7c49de9b3ddb5b11680549d577523 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Wed, 25 Mar 2020 12:31:11 +1100 Subject: [PATCH] Ensure correct path for genesis state file (#951) --- eth2/utils/eth2_testnet_config/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eth2/utils/eth2_testnet_config/src/lib.rs b/eth2/utils/eth2_testnet_config/src/lib.rs index b81152eae..a054193d4 100644 --- a/eth2/utils/eth2_testnet_config/src/lib.rs +++ b/eth2/utils/eth2_testnet_config/src/lib.rs @@ -156,11 +156,11 @@ impl Eth2TestnetConfig { let yaml_config = optional_load_from_file!(YAML_CONFIG_FILE); // The genesis state is a special case because it uses SSZ, not YAML. - let file = base_dir.join(GENESIS_STATE_FILE); - let genesis_state = if base_dir.join(&file).exists() { + let genesis_file_path = base_dir.join(GENESIS_STATE_FILE); + let genesis_state = if genesis_file_path.exists() { Some( - File::open(base_dir.join(&file)) - .map_err(|e| format!("Unable to open {:?}: {:?}", file, e)) + File::open(&genesis_file_path) + .map_err(|e| format!("Unable to open {:?}: {:?}", genesis_file_path, e)) .and_then(|mut file| { let mut bytes = vec![]; file.read_to_end(&mut bytes)