|
8 | 8 | transaction_processing_callback::{AccountState, TransactionProcessingCallback}, |
9 | 9 | }, |
10 | 10 | ahash::{AHashMap, AHashSet}, |
| 11 | + solana_account::{ |
| 12 | + Account, AccountSharedData, ReadableAccount, WritableAccount, PROGRAM_OWNERS, |
| 13 | + }, |
11 | 14 | solana_compute_budget::compute_budget_limits::ComputeBudgetLimits, |
12 | 15 | solana_feature_set::{self as feature_set, FeatureSet}, |
| 16 | + solana_fee_structure::FeeDetails, |
| 17 | + solana_instruction::{BorrowedAccountMeta, BorrowedInstruction}, |
| 18 | + solana_instructions_sysvar::construct_instructions_data, |
| 19 | + solana_nonce::state::State as NonceState, |
13 | 20 | solana_program_runtime::loaded_programs::ProgramCacheForTxBatch, |
14 | | - solana_sdk::{ |
15 | | - account::{Account, AccountSharedData, ReadableAccount, WritableAccount, PROGRAM_OWNERS}, |
16 | | - fee::FeeDetails, |
| 21 | + solana_pubkey::Pubkey, |
| 22 | + solana_rent::RentDue, |
| 23 | + solana_rent_debits::RentDebits, |
| 24 | + solana_sdk::rent_collector::{CollectedInfo, RENT_EXEMPT_RENT_EPOCH}, |
| 25 | + solana_sdk_ids::{ |
17 | 26 | native_loader, |
18 | | - nonce::State as NonceState, |
19 | | - pubkey::Pubkey, |
20 | | - rent::RentDue, |
21 | | - rent_collector::{CollectedInfo, RENT_EXEMPT_RENT_EPOCH}, |
22 | | - rent_debits::RentDebits, |
23 | | - sysvar::{ |
24 | | - self, |
25 | | - instructions::{construct_instructions_data, BorrowedAccountMeta, BorrowedInstruction}, |
26 | | - slot_history, |
27 | | - }, |
28 | | - transaction::{Result, TransactionError}, |
29 | | - transaction_context::{IndexOfAccount, TransactionAccount}, |
| 27 | + sysvar::{self, slot_history}, |
30 | 28 | }, |
31 | 29 | solana_svm_rent_collector::svm_rent_collector::SVMRentCollector, |
32 | 30 | solana_svm_transaction::svm_message::SVMMessage, |
33 | 31 | solana_system_program::{get_system_account_kind, SystemAccountKind}, |
| 32 | + solana_transaction_context::{IndexOfAccount, TransactionAccount}, |
| 33 | + solana_transaction_error::{TransactionError, TransactionResult as Result}, |
34 | 34 | std::{ |
35 | 35 | collections::HashMap, |
36 | 36 | num::{NonZeroU32, Saturating}, |
@@ -580,7 +580,7 @@ fn load_transaction_account<CB: TransactionProcessingCallback>( |
580 | 580 | ) -> LoadedTransactionAccount { |
581 | 581 | let usage_pattern = AccountUsagePattern::new(message, account_index); |
582 | 582 |
|
583 | | - let loaded_account = if solana_sdk::sysvar::instructions::check_id(account_key) { |
| 583 | + let loaded_account = if solana_sdk_ids::sysvar::instructions::check_id(account_key) { |
584 | 584 | // Since the instructions sysvar is constructed by the SVM and modified |
585 | 585 | // for each transaction instruction, it cannot be loaded. |
586 | 586 | LoadedTransactionAccount { |
@@ -697,38 +697,40 @@ mod tests { |
697 | 697 | transaction_account_state_info::TransactionAccountStateInfo, |
698 | 698 | transaction_processing_callback::TransactionProcessingCallback, |
699 | 699 | }, |
700 | | - nonce::state::Versions as NonceVersions, |
| 700 | + solana_account::{Account, AccountSharedData, ReadableAccount, WritableAccount}, |
701 | 701 | solana_compute_budget::{compute_budget::ComputeBudget, compute_budget_limits}, |
| 702 | + solana_epoch_schedule::EpochSchedule, |
702 | 703 | solana_feature_set::FeatureSet, |
| 704 | + solana_hash::Hash, |
| 705 | + solana_instruction::{AccountMeta, Instruction}, |
| 706 | + solana_keypair::Keypair, |
| 707 | + solana_message::{ |
| 708 | + compiled_instruction::CompiledInstruction, |
| 709 | + v0::{LoadedAddresses, LoadedMessage}, |
| 710 | + LegacyMessage, Message, MessageHeader, SanitizedMessage, |
| 711 | + }, |
| 712 | + solana_native_token::{sol_to_lamports, LAMPORTS_PER_SOL}, |
| 713 | + solana_nonce::{self as nonce, versions::Versions as NonceVersions}, |
| 714 | + solana_program::bpf_loader_upgradeable::UpgradeableLoaderState, |
703 | 715 | solana_program_runtime::loaded_programs::{ |
704 | 716 | ProgramCacheEntry, ProgramCacheEntryOwner, ProgramCacheEntryType, |
705 | 717 | ProgramCacheForTxBatch, |
706 | 718 | }, |
| 719 | + solana_pubkey::Pubkey, |
| 720 | + solana_rent::Rent, |
| 721 | + solana_rent_debits::RentDebits, |
| 722 | + solana_reserved_account_keys::ReservedAccountKeys, |
707 | 723 | solana_sbpf::program::BuiltinProgram, |
708 | | - solana_sdk::{ |
709 | | - account::{Account, AccountSharedData, ReadableAccount, WritableAccount}, |
710 | | - bpf_loader, |
711 | | - bpf_loader_upgradeable::{self, UpgradeableLoaderState}, |
712 | | - epoch_schedule::EpochSchedule, |
713 | | - hash::Hash, |
714 | | - instruction::{AccountMeta, CompiledInstruction, Instruction}, |
715 | | - message::{ |
716 | | - v0::{LoadedAddresses, LoadedMessage}, |
717 | | - LegacyMessage, Message, MessageHeader, SanitizedMessage, |
718 | | - }, |
719 | | - native_loader, |
720 | | - native_token::{sol_to_lamports, LAMPORTS_PER_SOL}, |
721 | | - nonce, |
722 | | - pubkey::Pubkey, |
723 | | - rent::Rent, |
724 | | - rent_collector::{RentCollector, RENT_EXEMPT_RENT_EPOCH}, |
725 | | - rent_debits::RentDebits, |
726 | | - reserved_account_keys::ReservedAccountKeys, |
727 | | - signature::{Keypair, Signature, Signer}, |
728 | | - system_program, system_transaction, sysvar, |
729 | | - transaction::{Result, SanitizedTransaction, Transaction, TransactionError}, |
730 | | - transaction_context::{TransactionAccount, TransactionContext}, |
| 724 | + solana_sdk::rent_collector::{RentCollector, RENT_EXEMPT_RENT_EPOCH}, |
| 725 | + solana_sdk_ids::{ |
| 726 | + bpf_loader, bpf_loader_upgradeable, native_loader, system_program, sysvar, |
731 | 727 | }, |
| 728 | + solana_signature::Signature, |
| 729 | + solana_signer::Signer, |
| 730 | + solana_system_transaction::transfer, |
| 731 | + solana_transaction::{sanitized::SanitizedTransaction, Transaction}, |
| 732 | + solana_transaction_context::{TransactionAccount, TransactionContext}, |
| 733 | + solana_transaction_error::{TransactionError, TransactionResult as Result}, |
732 | 734 | std::{borrow::Cow, cell::RefCell, collections::HashMap, fs::File, io::Read, sync::Arc}, |
733 | 735 | }; |
734 | 736 |
|
@@ -1134,12 +1136,12 @@ mod tests { |
1134 | 1136 | #[test] |
1135 | 1137 | fn test_instructions() { |
1136 | 1138 | solana_logger::setup(); |
1137 | | - let instructions_key = solana_sdk::sysvar::instructions::id(); |
| 1139 | + let instructions_key = solana_sdk_ids::sysvar::instructions::id(); |
1138 | 1140 | let keypair = Keypair::new(); |
1139 | 1141 | let instructions = vec![CompiledInstruction::new(1, &(), vec![0, 1])]; |
1140 | 1142 | let tx = Transaction::new_with_compiled_instructions( |
1141 | 1143 | &[&keypair], |
1142 | | - &[solana_sdk::pubkey::new_rand(), instructions_key], |
| 1144 | + &[solana_pubkey::new_rand(), instructions_key], |
1143 | 1145 | Hash::default(), |
1144 | 1146 | vec![native_loader::id()], |
1145 | 1147 | instructions, |
@@ -1364,7 +1366,7 @@ mod tests { |
1364 | 1366 | #[test] |
1365 | 1367 | fn test_construct_instructions_account() { |
1366 | 1368 | let loaded_message = LoadedMessage { |
1367 | | - message: Cow::Owned(solana_sdk::message::v0::Message::default()), |
| 1369 | + message: Cow::Owned(solana_message::v0::Message::default()), |
1368 | 1370 | loaded_addresses: Cow::Owned(LoadedAddresses::default()), |
1369 | 1371 | is_writable_account_cache: vec![false], |
1370 | 1372 | }; |
@@ -2095,7 +2097,7 @@ mod tests { |
2095 | 2097 | .insert(recipient, AccountSharedData::default()); |
2096 | 2098 | let mut account_loader = (&bank).into(); |
2097 | 2099 |
|
2098 | | - let tx = system_transaction::transfer( |
| 2100 | + let tx = transfer( |
2099 | 2101 | &mint_keypair, |
2100 | 2102 | &recipient, |
2101 | 2103 | sol_to_lamports(1.), |
@@ -2471,7 +2473,7 @@ mod tests { |
2471 | 2473 | let program1 = program1_keypair.pubkey(); |
2472 | 2474 | let program2 = Pubkey::new_unique(); |
2473 | 2475 | let programdata2 = Pubkey::new_unique(); |
2474 | | - use solana_sdk::account_utils::StateMut; |
| 2476 | + use solana_account::state_traits::StateMut; |
2475 | 2477 |
|
2476 | 2478 | let program2_size = std::mem::size_of::<UpgradeableLoaderState>() as u32; |
2477 | 2479 | let mut program2_account = AccountSharedData::default(); |
|
0 commit comments