From c289cd2a4b12854e4909e5bf2d9b572ac83ccdef Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 15 Apr 2022 03:09:34 +0000 Subject: [PATCH] Do not require default keypair to exist for bench-tps (#24356) (#24365) (cherry picked from commit 5e8c12ebdf2969389b32f8e85845ef1af6b304bf) Co-authored-by: Tyera Eulberg --- 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 d80567a560..950640d49a 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;