Add check to see if testnet dir exists

This commit is contained in:
Paul Hauner
2019-11-29 10:59:37 +11:00
parent e277996b16
commit b446d4eba7

View File

@@ -179,6 +179,13 @@ fn run_new_validator_subcommand<T: EthSpec>(
.parse::<PathBuf>()
.map_err(|e| format!("Unable to parse testnet-dir: {}", e))?;
if !testnet_dir.exists() {
return Err(format!(
"Testnet directory at {:?} does not exist",
testnet_dir
));
}
info!(
log,
"Loading deposit contract address";