Add show-validators command

This commit is contained in:
Michael Vines
2019-10-07 13:47:24 +09:00
parent 88bb55ffd2
commit d2e28b0f7e
2 changed files with 86 additions and 1 deletions

View File

@@ -57,6 +57,9 @@ pub enum CliCommand {
count: Option<u64>,
timeout: Duration,
},
ShowValidators {
use_lamports_unit: bool,
},
// Program Deployment
Deploy(String),
// Stake Commands
@@ -193,6 +196,7 @@ pub fn parse_command(
("get-slot", Some(_matches)) => Ok(CliCommand::GetSlot),
("get-transaction-count", Some(_matches)) => Ok(CliCommand::GetTransactionCount),
("ping", Some(matches)) => parse_cluster_ping(matches),
("show-validators", Some(matches)) => parse_show_validators(matches),
// Program Deployment
("deploy", Some(deploy_matches)) => Ok(CliCommand::Deploy(
deploy_matches
@@ -752,6 +756,9 @@ pub fn process_command(config: &CliConfig) -> ProcessResult {
count,
timeout,
} => process_ping(&rpc_client, config, interval, count, timeout),
CliCommand::ShowValidators { use_lamports_unit } => {
process_show_validators(&rpc_client, *use_lamports_unit)
}
// Program Deployment