CLI: Drop unused helper

This commit is contained in:
Trent Nelson 2020-09-22 14:44:19 -06:00 committed by Trent Nelson
parent 9a60353fa9
commit be88e868bd
1 changed files with 0 additions and 17 deletions

View File

@ -42,7 +42,6 @@ use solana_sdk::{
clock::{Epoch, Slot, DEFAULT_TICKS_PER_SECOND}, clock::{Epoch, Slot, DEFAULT_TICKS_PER_SECOND},
commitment_config::CommitmentConfig, commitment_config::CommitmentConfig,
decode_error::DecodeError, decode_error::DecodeError,
fee_calculator::FeeCalculator,
hash::Hash, hash::Hash,
instruction::InstructionError, instruction::InstructionError,
loader_instruction, loader_instruction,
@ -881,22 +880,6 @@ pub fn parse_command(
pub type ProcessResult = Result<String, Box<dyn std::error::Error>>; pub type ProcessResult = Result<String, Box<dyn std::error::Error>>;
pub fn get_blockhash_and_fee_calculator(
rpc_client: &RpcClient,
sign_only: bool,
blockhash: Option<Hash>,
) -> Result<(Hash, FeeCalculator), Box<dyn std::error::Error>> {
Ok(if let Some(blockhash) = blockhash {
if sign_only {
(blockhash, FeeCalculator::default())
} else {
(blockhash, rpc_client.get_recent_blockhash()?.1)
}
} else {
rpc_client.get_recent_blockhash()?
})
}
pub fn parse_create_address_with_seed( pub fn parse_create_address_with_seed(
matches: &ArgMatches<'_>, matches: &ArgMatches<'_>,
default_signer: &DefaultSigner, default_signer: &DefaultSigner,