Add first-available-block command

This commit is contained in:
Michael Vines
2020-09-06 10:54:01 -07:00
parent b529fc7fb9
commit 6677996369
4 changed files with 21 additions and 0 deletions

View File

@@ -177,6 +177,7 @@ pub enum CliCommand {
program_id: Pubkey,
},
Fees,
FirstAvailableBlock,
GetBlockTime {
slot: Option<Slot>,
},
@@ -619,6 +620,10 @@ pub fn parse_command(
command: CliCommand::Fees,
signers: vec![],
}),
("first-available-block", Some(_matches)) => Ok(CliCommandInfo {
command: CliCommand::FirstAvailableBlock,
signers: vec![],
}),
("block-time", Some(matches)) => parse_get_block_time(matches),
("epoch-info", Some(matches)) => parse_get_epoch_info(matches),
("genesis-hash", Some(_matches)) => Ok(CliCommandInfo {
@@ -1487,6 +1492,7 @@ pub fn process_command(config: &CliConfig) -> ProcessResult {
program_id,
} => process_create_address_with_seed(config, from_pubkey.as_ref(), &seed, &program_id),
CliCommand::Fees => process_fees(&rpc_client, config),
CliCommand::FirstAvailableBlock => process_first_available_block(&rpc_client),
CliCommand::GetBlockTime { slot } => process_get_block_time(&rpc_client, config, *slot),
CliCommand::GetEpoch => process_get_epoch(&rpc_client, config),
CliCommand::GetEpochInfo => process_get_epoch_info(&rpc_client, config),