Do not require default keypair to exist for bench-tps (#24356)

This commit is contained in:
Tyera Eulberg 2022-04-14 21:05:08 -04:00 committed by GitHub
parent 77182fcdda
commit 5e8c12ebdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -306,7 +306,11 @@ pub fn extract_args(matches: &ArgMatches) -> Config {
matches.value_of("identity").unwrap_or(""),
&config.keypair_path,
);
args.id = read_keypair_file(id_path).expect("could not parse identity path");
if let Ok(id) = read_keypair_file(id_path) {
args.id = id;
} else if matches.is_present("identity") {
panic!("could not parse identity path");
}
if matches.is_present("tpu_client") {
args.external_client_type = ExternalClientType::TpuClient;