diff --git a/src/wallet.rs b/src/wallet.rs index 05a6d5305c..720a618d3c 100644 --- a/src/wallet.rs +++ b/src/wallet.rs @@ -313,6 +313,12 @@ pub fn parse_command( } pub fn process_command(config: &WalletConfig) -> Result> { + match config.command { + // Get address of this client + WalletCommand::Address => return Ok(format!("{}", config.id.pubkey())), + _ => (), + } + let leader = poll_gossip_for_leader(config.network, config.timeout)?; let tpu_addr = leader.contact_info.tpu; let drone_addr = config.drone_addr(tpu_addr); @@ -320,7 +326,7 @@ pub fn process_command(config: &WalletConfig) -> Result Ok(format!("{}", config.id.pubkey())), + WalletCommand::Address => unreachable!(), // Request an airdrop from Solana Drone; WalletCommand::AirDrop(tokens) => { println!(