From 5e8c12ebdf2969389b32f8e85845ef1af6b304bf Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Thu, 14 Apr 2022 21:05:08 -0400 Subject: [PATCH] Do not require default keypair to exist for bench-tps (#24356) --- bench-tps/src/cli.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bench-tps/src/cli.rs b/bench-tps/src/cli.rs index d80567a56..950640d49 100644 --- a/bench-tps/src/cli.rs +++ b/bench-tps/src/cli.rs @@ -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;