From 8d700c3b944f27420236ba068820bdaa73ba79b5 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Wed, 16 Dec 2020 17:46:19 -0800 Subject: [PATCH] Use an ephemeral mint address if the client keypair is not available Typically this can occur in a CI environment --- validator/src/bin/solana-test-validator.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/validator/src/bin/solana-test-validator.rs b/validator/src/bin/solana-test-validator.rs index 2e3763f54..0339bce13 100644 --- a/validator/src/bin/solana-test-validator.rs +++ b/validator/src/bin/solana-test-validator.rs @@ -143,14 +143,8 @@ fn main() { }; let mint_address = pubkey_of(&matches, "mint_address").unwrap_or_else(|| { - read_keypair_file(&cli_config.keypair_path) - .unwrap_or_else(|err| { - eprintln!( - "Error: Unable to read keypair file {}: {}", - cli_config.keypair_path, err - ); - exit(1); - }) + read_keypair_file(dbg!(&cli_config.keypair_path)) + .unwrap_or_else(|_| Keypair::new()) .pubkey() });