Skip to content

Commit

Permalink
remove solana-sdk from rpc-client
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinheavey committed Dec 5, 2024
1 parent e28c4df commit 3f21340
Show file tree
Hide file tree
Showing 7 changed files with 407 additions and 468 deletions.
14 changes: 14 additions & 0 deletions Cargo.lock

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

13 changes: 12 additions & 1 deletion programs/sbf/Cargo.lock

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

16 changes: 15 additions & 1 deletion rpc-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,20 @@ semver = { workspace = true }
serde = { workspace = true }
serde_derive = { workspace = true }
serde_json = { workspace = true }
solana-account = { workspace = true }
solana-account-decoder-client-types = { workspace = true, features = ["zstd"] }
solana-clock = { workspace = true }
solana-commitment-config = { workspace = true }
solana-epoch-info = { workspace = true }
solana-epoch-schedule = { workspace = true }
solana-hash = { workspace = true }
solana-instruction = { workspace = true }
solana-program = { workspace = true, default-features = false }
solana-pubkey = { workspace = true }
solana-rpc-client-api = { workspace = true }
solana-sdk = { workspace = true }
solana-signature = { workspace = true }
solana-transaction = { workspace = true }
solana-transaction-error = { workspace = true }
solana-transaction-status-client-types = { workspace = true }
solana-version = { workspace = true }
tokio = { workspace = true, features = ["full"] }
Expand All @@ -36,6 +47,9 @@ futures = { workspace = true }
jsonrpc-core = { workspace = true }
jsonrpc-http-server = { workspace = true }
solana-account-decoder = { workspace = true }
solana-keypair = { workspace = true }
solana-sdk = { path = "../sdk" }
solana-signer = { workspace = true }

[features]
default = ["spinner"]
Expand Down
23 changes: 11 additions & 12 deletions rpc-client/src/mock_sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ use {
base64::{prelude::BASE64_STANDARD, Engine},
serde_json::{json, Number, Value},
solana_account_decoder_client_types::{UiAccount, UiAccountData, UiAccountEncoding},
solana_clock::{Slot, UnixTimestamp},
solana_epoch_info::EpochInfo,
solana_epoch_schedule::EpochSchedule,
solana_instruction::error::InstructionError,
solana_program::message::MessageHeader,
solana_pubkey::Pubkey,
solana_rpc_client_api::{
client_error::Result,
config::RpcBlockProductionConfig,
Expand All @@ -19,16 +25,9 @@ use {
RpcVoteAccountStatus,
},
},
solana_sdk::{
clock::{Slot, UnixTimestamp},
epoch_info::EpochInfo,
instruction::InstructionError,
message::MessageHeader,
pubkey::Pubkey,
signature::Signature,
sysvar::epoch_schedule::EpochSchedule,
transaction::{self, Transaction, TransactionError, TransactionVersion},
},
solana_signature::Signature,
solana_transaction::{versioned::TransactionVersion, Transaction},
solana_transaction_error::{TransactionError, TransactionResult},
solana_transaction_status_client_types::{
option_serializer::OptionSerializer, EncodedConfirmedBlock,
EncodedConfirmedTransactionWithStatusMeta, EncodedTransaction,
Expand Down Expand Up @@ -124,7 +123,7 @@ impl RpcSender for MockSender {
transaction_count: Some(123),
})?,
"getSignatureStatuses" => {
let status: transaction::Result<()> = if self.url == "account_in_use" {
let status: TransactionResult<()> = if self.url == "account_in_use" {
Err(TransactionError::AccountInUse)
} else if self.url == "instruction_error" {
Err(TransactionError::InstructionError(
Expand Down Expand Up @@ -455,7 +454,7 @@ pub(crate) fn mock_encoded_account(pubkey: &Pubkey) -> UiAccount {

#[cfg(test)]
mod tests {
use {super::*, solana_account_decoder::encode_ui_account, solana_sdk::account::Account};
use {super::*, solana_account::Account, solana_account_decoder::encode_ui_account};

#[test]
fn test_mock_encoded_account() {
Expand Down
Loading

0 comments on commit 3f21340

Please sign in to comment.