Skip to content

Commit

Permalink
use solana-commitment-config instead of solana-sdk in solana-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinheavey committed Jan 10, 2025
1 parent c853b2c commit cc045c5
Show file tree
Hide file tree
Showing 20 changed files with 26 additions and 32 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ solana-clap-utils = { workspace = true }
solana-cli-config = { workspace = true }
solana-cli-output = { workspace = true }
solana-client = { workspace = true }
solana-commitment-config = { workspace = true }
solana-compute-budget = { workspace = true }
solana-config-program = { workspace = true }
solana-connection-cache = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion cli/src/address_lookup_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use {
clap::{App, AppSettings, Arg, ArgMatches, SubCommand},
solana_clap_utils::{self, input_parsers::*, input_validators::*, keypair::*},
solana_cli_output::{CliAddressLookupTable, CliAddressLookupTableCreated, CliSignature},
solana_commitment_config::CommitmentConfig,
solana_remote_wallet::remote_wallet::RemoteWalletManager,
solana_rpc_client::rpc_client::RpcClient,
solana_rpc_client_api::config::RpcSendTransactionConfig,
Expand All @@ -17,7 +18,6 @@ use {
state::AddressLookupTable,
},
clock::Clock,
commitment_config::CommitmentConfig,
message::Message,
pubkey::Pubkey,
signer::Signer,
Expand Down
6 changes: 2 additions & 4 deletions cli/src/checks.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
use {
crate::cli::CliError,
solana_commitment_config::CommitmentConfig,
solana_rpc_client::rpc_client::RpcClient,
solana_rpc_client_api::client_error::{Error as ClientError, Result as ClientResult},
solana_sdk::{
commitment_config::CommitmentConfig, message::Message, native_token::lamports_to_sol,
pubkey::Pubkey,
},
solana_sdk::{message::Message, native_token::lamports_to_sol, pubkey::Pubkey},
};

pub fn check_account_for_fee(
Expand Down
2 changes: 1 addition & 1 deletion cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use {
display::println_name_value, CliSignature, CliValidatorsSortOrder, OutputFormat,
},
solana_client::connection_cache::ConnectionCache,
solana_commitment_config::CommitmentConfig,
solana_decode_error::DecodeError,
solana_remote_wallet::remote_wallet::RemoteWalletManager,
solana_rpc_client::rpc_client::RpcClient,
Expand All @@ -23,7 +24,6 @@ use {
solana_rpc_client_nonce_utils::blockhash_query::BlockhashQuery,
solana_sdk::{
clock::{Epoch, Slot},
commitment_config::CommitmentConfig,
hash::Hash,
instruction::InstructionError,
offchain_message::OffchainMessage,
Expand Down
2 changes: 1 addition & 1 deletion cli/src/cluster_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ use {
},
*,
},
solana_commitment_config::CommitmentConfig,
solana_pubsub_client::pubsub_client::PubsubClient,
solana_remote_wallet::remote_wallet::RemoteWalletManager,
solana_rpc_client::rpc_client::{GetConfirmedSignaturesForAddress2Config, RpcClient},
Expand All @@ -44,7 +45,6 @@ use {
account::from_account,
account_utils::StateMut,
clock::{self, Clock, Slot},
commitment_config::CommitmentConfig,
epoch_schedule::Epoch,
hash::Hash,
message::Message,
Expand Down
2 changes: 1 addition & 1 deletion cli/src/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ use {
},
tpu_client::{TpuClient, TpuClientConfig},
},
solana_commitment_config::CommitmentConfig,
solana_compute_budget::compute_budget::ComputeBudget,
solana_feature_set::{FeatureSet, FEATURE_NAMES},
solana_program_runtime::invoke_context::InvokeContext,
Expand All @@ -57,7 +58,6 @@ use {
account_utils::StateMut,
bpf_loader, bpf_loader_deprecated,
bpf_loader_upgradeable::{self, get_program_data_address, UpgradeableLoaderState},
commitment_config::CommitmentConfig,
compute_budget,
instruction::{Instruction, InstructionError},
message::Message,
Expand Down
6 changes: 2 additions & 4 deletions cli/src/spend_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ use {
solana_clap_utils::{
compute_budget::ComputeUnitLimit, input_parsers::lamports_of_sol, offline::SIGN_ONLY_ARG,
},
solana_commitment_config::CommitmentConfig,
solana_rpc_client::rpc_client::RpcClient,
solana_sdk::{
commitment_config::CommitmentConfig, hash::Hash, message::Message,
native_token::lamports_to_sol, pubkey::Pubkey,
},
solana_sdk::{hash::Hash, message::Message, native_token::lamports_to_sol, pubkey::Pubkey},
};

#[derive(Debug, PartialEq, Eq, Clone, Copy)]
Expand Down
2 changes: 1 addition & 1 deletion cli/src/stake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ use {
CliEpochReward, CliStakeHistory, CliStakeHistoryEntry, CliStakeState, CliStakeType,
OutputFormat, ReturnSignersConfig,
},
solana_commitment_config::CommitmentConfig,
solana_remote_wallet::remote_wallet::RemoteWalletManager,
solana_rpc_client::rpc_client::RpcClient,
solana_rpc_client_api::{
Expand All @@ -43,7 +44,6 @@ use {
account::{from_account, Account},
account_utils::StateMut,
clock::{Clock, UnixTimestamp, SECONDS_PER_DAY},
commitment_config::CommitmentConfig,
epoch_schedule::EpochSchedule,
message::Message,
native_token::Sol,
Expand Down
6 changes: 2 additions & 4 deletions cli/src/test_utils.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
use {
solana_commitment_config::CommitmentConfig,
solana_rpc_client::rpc_client::RpcClient,
solana_sdk::{
clock::{Epoch, DEFAULT_MS_PER_SLOT},
commitment_config::CommitmentConfig,
},
solana_sdk::clock::{Epoch, DEFAULT_MS_PER_SLOT},
std::{thread::sleep, time::Duration},
};

Expand Down
6 changes: 3 additions & 3 deletions cli/src/vote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ use {
return_signers_with_config, CliEpochVotingHistory, CliLandedVote, CliVoteAccount,
ReturnSignersConfig,
},
solana_commitment_config::CommitmentConfig,
solana_remote_wallet::remote_wallet::RemoteWalletManager,
solana_rpc_client::rpc_client::RpcClient,
solana_rpc_client_api::config::RpcGetVoteAccountsConfig,
solana_rpc_client_nonce_utils::blockhash_query::BlockhashQuery,
solana_sdk::{
account::Account, commitment_config::CommitmentConfig, message::Message,
native_token::lamports_to_sol, pubkey::Pubkey, system_instruction::SystemError,
transaction::Transaction,
account::Account, message::Message, native_token::lamports_to_sol, pubkey::Pubkey,
system_instruction::SystemError, transaction::Transaction,
},
solana_vote_program::{
vote_error::VoteError,
Expand Down
2 changes: 1 addition & 1 deletion cli/src/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ use {
CliSignatureVerificationStatus, CliTransaction, CliTransactionConfirmation, OutputFormat,
ReturnSignersConfig,
},
solana_commitment_config::CommitmentConfig,
solana_remote_wallet::remote_wallet::RemoteWalletManager,
solana_rpc_client::rpc_client::RpcClient,
solana_rpc_client_api::config::RpcTransactionConfig,
solana_rpc_client_nonce_utils::blockhash_query::BlockhashQuery,
solana_sdk::{
commitment_config::CommitmentConfig,
message::Message,
offchain_message::OffchainMessage,
pubkey::Pubkey,
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/cluster_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ use {
cli::{process_command, request_and_confirm_airdrop, CliCommand, CliConfig},
test_utils::check_ready,
},
solana_commitment_config::CommitmentConfig,
solana_faucet::faucet::run_local_faucet,
solana_rpc_client::rpc_client::RpcClient,
solana_sdk::{
commitment_config::CommitmentConfig,
fee::FeeStructure,
native_token::sol_to_lamports,
signature::{Keypair, Signer},
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/nonce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ use {
test_utils::check_ready,
},
solana_cli_output::{parse_sign_only_reply_string, OutputFormat},
solana_commitment_config::CommitmentConfig,
solana_faucet::faucet::run_local_faucet,
solana_rpc_client::rpc_client::RpcClient,
solana_rpc_client_nonce_utils::blockhash_query::{self, BlockhashQuery},
solana_sdk::{
commitment_config::CommitmentConfig,
hash::Hash,
native_token::sol_to_lamports,
pubkey::Pubkey,
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use {
},
solana_cli_output::{parse_sign_only_reply_string, OutputFormat},
solana_client::rpc_config::RpcSendTransactionConfig,
solana_commitment_config::CommitmentConfig,
solana_faucet::faucet::run_local_faucet,
solana_feature_set::enable_alt_bn128_syscall,
solana_rpc::rpc::JsonRpcConfig,
Expand All @@ -23,7 +24,6 @@ use {
account_utils::StateMut,
borsh1::try_from_slice_unchecked,
bpf_loader_upgradeable::{self, UpgradeableLoaderState},
commitment_config::CommitmentConfig,
compute_budget::{self, ComputeBudgetInstruction},
fee_calculator::FeeRateGovernor,
pubkey::Pubkey,
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/request_airdrop.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#![allow(clippy::arithmetic_side_effects)]
use {
solana_cli::cli::{process_command, CliCommand, CliConfig},
solana_commitment_config::CommitmentConfig,
solana_faucet::faucet::run_local_faucet,
solana_rpc_client::rpc_client::RpcClient,
solana_sdk::{
commitment_config::CommitmentConfig,
native_token::sol_to_lamports,
signature::{Keypair, Signer},
},
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/stake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ use {
test_utils::{check_ready, wait_for_next_epoch_plus_n_slots},
},
solana_cli_output::{parse_sign_only_reply_string, OutputFormat},
solana_commitment_config::CommitmentConfig,
solana_faucet::faucet::run_local_faucet,
solana_rpc_client::rpc_client::RpcClient,
solana_rpc_client_api::request::DELINQUENT_VALIDATOR_SLOT_DISTANCE,
solana_rpc_client_nonce_utils::blockhash_query::{self, BlockhashQuery},
solana_sdk::{
account_utils::StateMut,
commitment_config::CommitmentConfig,
epoch_schedule::EpochSchedule,
fee::FeeStructure,
fee_calculator::FeeRateGovernor,
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ use {
test_utils::check_ready,
},
solana_cli_output::{parse_sign_only_reply_string, OutputFormat},
solana_commitment_config::CommitmentConfig,
solana_faucet::faucet::run_local_faucet,
solana_rpc_client::rpc_client::RpcClient,
solana_rpc_client_nonce_utils::blockhash_query::{self, BlockhashQuery},
solana_sdk::{
commitment_config::CommitmentConfig,
compute_budget::ComputeBudgetInstruction,
fee::FeeStructure,
message::Message,
Expand Down
6 changes: 2 additions & 4 deletions cli/tests/validator_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ use {
check_balance,
cli::{process_command, request_and_confirm_airdrop, CliCommand, CliConfig},
},
solana_commitment_config::CommitmentConfig,
solana_faucet::faucet::run_local_faucet,
solana_rpc_client::rpc_client::RpcClient,
solana_sdk::{
commitment_config::CommitmentConfig,
signature::{keypair_from_seed, Keypair, Signer},
},
solana_sdk::signature::{keypair_from_seed, Keypair, Signer},
solana_streamer::socket::SocketAddrSpace,
solana_test_validator::TestValidator,
test_case::test_case,
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/vote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ use {
spend_utils::SpendAmount,
},
solana_cli_output::{parse_sign_only_reply_string, OutputFormat},
solana_commitment_config::CommitmentConfig,
solana_faucet::faucet::run_local_faucet,
solana_rpc_client::rpc_client::RpcClient,
solana_rpc_client_nonce_utils::blockhash_query::{self, BlockhashQuery},
solana_sdk::{
account_utils::StateMut,
commitment_config::CommitmentConfig,
signature::{Keypair, NullSigner, Signer},
},
solana_streamer::socket::SocketAddrSpace,
Expand Down

0 comments on commit cc045c5

Please sign in to comment.