Reformat imports to a consistent style for imports
rustfmt.toml configuration: imports_granularity = "One" group_imports = "One"
This commit is contained in:
114
cli/src/stake.rs
114
cli/src/stake.rs
@@ -1,53 +1,55 @@
|
||||
use crate::{
|
||||
checks::{check_account_for_fee_with_commitment, check_unique_pubkeys},
|
||||
cli::{
|
||||
log_instruction_custom_error, CliCommand, CliCommandInfo, CliConfig, CliError,
|
||||
ProcessResult,
|
||||
use {
|
||||
crate::{
|
||||
checks::{check_account_for_fee_with_commitment, check_unique_pubkeys},
|
||||
cli::{
|
||||
log_instruction_custom_error, CliCommand, CliCommandInfo, CliConfig, CliError,
|
||||
ProcessResult,
|
||||
},
|
||||
memo::WithMemo,
|
||||
nonce::check_nonce_account,
|
||||
spend_utils::{resolve_spend_tx_and_check_account_balances, SpendAmount},
|
||||
},
|
||||
memo::WithMemo,
|
||||
nonce::check_nonce_account,
|
||||
spend_utils::{resolve_spend_tx_and_check_account_balances, SpendAmount},
|
||||
};
|
||||
use clap::{value_t, App, Arg, ArgGroup, ArgMatches, SubCommand};
|
||||
use solana_clap_utils::{
|
||||
fee_payer::{fee_payer_arg, FEE_PAYER_ARG},
|
||||
input_parsers::*,
|
||||
input_validators::*,
|
||||
keypair::{DefaultSigner, SignerIndex},
|
||||
memo::{memo_arg, MEMO_ARG},
|
||||
nonce::*,
|
||||
offline::*,
|
||||
ArgConstant,
|
||||
};
|
||||
use solana_cli_output::{
|
||||
return_signers_with_config, CliEpochReward, CliStakeHistory, CliStakeHistoryEntry,
|
||||
CliStakeState, CliStakeType, OutputFormat, ReturnSignersConfig,
|
||||
};
|
||||
use solana_client::{
|
||||
blockhash_query::BlockhashQuery, nonce_utils, rpc_client::RpcClient,
|
||||
rpc_request::DELINQUENT_VALIDATOR_SLOT_DISTANCE, rpc_response::RpcInflationReward,
|
||||
};
|
||||
use solana_remote_wallet::remote_wallet::RemoteWalletManager;
|
||||
use solana_sdk::{
|
||||
account::from_account,
|
||||
account_utils::StateMut,
|
||||
clock::{Clock, UnixTimestamp, SECONDS_PER_DAY},
|
||||
commitment_config::CommitmentConfig,
|
||||
epoch_schedule::EpochSchedule,
|
||||
message::Message,
|
||||
pubkey::Pubkey,
|
||||
stake::{
|
||||
self,
|
||||
instruction::{self as stake_instruction, LockupArgs, StakeError},
|
||||
state::{Authorized, Lockup, Meta, StakeActivationStatus, StakeAuthorize, StakeState},
|
||||
clap::{value_t, App, Arg, ArgGroup, ArgMatches, SubCommand},
|
||||
solana_clap_utils::{
|
||||
fee_payer::{fee_payer_arg, FEE_PAYER_ARG},
|
||||
input_parsers::*,
|
||||
input_validators::*,
|
||||
keypair::{DefaultSigner, SignerIndex},
|
||||
memo::{memo_arg, MEMO_ARG},
|
||||
nonce::*,
|
||||
offline::*,
|
||||
ArgConstant,
|
||||
},
|
||||
stake_history::StakeHistory,
|
||||
system_instruction::SystemError,
|
||||
sysvar::{clock, stake_history},
|
||||
transaction::Transaction,
|
||||
solana_cli_output::{
|
||||
return_signers_with_config, CliEpochReward, CliStakeHistory, CliStakeHistoryEntry,
|
||||
CliStakeState, CliStakeType, OutputFormat, ReturnSignersConfig,
|
||||
},
|
||||
solana_client::{
|
||||
blockhash_query::BlockhashQuery, nonce_utils, rpc_client::RpcClient,
|
||||
rpc_request::DELINQUENT_VALIDATOR_SLOT_DISTANCE, rpc_response::RpcInflationReward,
|
||||
},
|
||||
solana_remote_wallet::remote_wallet::RemoteWalletManager,
|
||||
solana_sdk::{
|
||||
account::from_account,
|
||||
account_utils::StateMut,
|
||||
clock::{Clock, UnixTimestamp, SECONDS_PER_DAY},
|
||||
commitment_config::CommitmentConfig,
|
||||
epoch_schedule::EpochSchedule,
|
||||
message::Message,
|
||||
pubkey::Pubkey,
|
||||
stake::{
|
||||
self,
|
||||
instruction::{self as stake_instruction, LockupArgs, StakeError},
|
||||
state::{Authorized, Lockup, Meta, StakeActivationStatus, StakeAuthorize, StakeState},
|
||||
},
|
||||
stake_history::StakeHistory,
|
||||
system_instruction::SystemError,
|
||||
sysvar::{clock, stake_history},
|
||||
transaction::Transaction,
|
||||
},
|
||||
solana_vote_program::vote_state::VoteState,
|
||||
std::{ops::Deref, sync::Arc},
|
||||
};
|
||||
use solana_vote_program::vote_state::VoteState;
|
||||
use std::{ops::Deref, sync::Arc};
|
||||
|
||||
pub const STAKE_AUTHORITY_ARG: ArgConstant<'static> = ArgConstant {
|
||||
name: "stake_authority",
|
||||
@@ -2423,16 +2425,18 @@ pub fn process_delegate_stake(
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::{clap_app::get_clap_app, cli::parse_command};
|
||||
use solana_client::blockhash_query;
|
||||
use solana_sdk::{
|
||||
hash::Hash,
|
||||
signature::{
|
||||
keypair_from_seed, read_keypair_file, write_keypair, Keypair, Presigner, Signer,
|
||||
use {
|
||||
super::*,
|
||||
crate::{clap_app::get_clap_app, cli::parse_command},
|
||||
solana_client::blockhash_query,
|
||||
solana_sdk::{
|
||||
hash::Hash,
|
||||
signature::{
|
||||
keypair_from_seed, read_keypair_file, write_keypair, Keypair, Presigner, Signer,
|
||||
},
|
||||
},
|
||||
tempfile::NamedTempFile,
|
||||
};
|
||||
use tempfile::NamedTempFile;
|
||||
|
||||
fn make_tmp_file() -> (String, NamedTempFile) {
|
||||
let tmp_file = NamedTempFile::new().unwrap();
|
||||
|
Reference in New Issue
Block a user