@@ -5,35 +5,26 @@ use std::sync::RwLock;
55use solana_sdk:: account:: AccountSharedData ;
66use solana_sdk:: account:: ReadableAccount ;
77use solana_sdk:: feature_set:: FeatureSet ;
8- use solana_sdk:: fee:: FeeStructure ;
9- use solana_sdk:: hash:: Hash ;
108use solana_sdk:: native_token:: LAMPORTS_PER_SOL ;
119use solana_sdk:: pubkey:: Pubkey ;
1210use solana_sdk:: signature:: Keypair ;
1311use solana_sdk:: signer:: Signer ;
1412
1513use solana_svm:: transaction_processing_callback:: TransactionProcessingCallback ;
16- use solana_svm:: transaction_processor:: ExecutionRecordingConfig ;
1714use solana_svm:: transaction_processor:: TransactionBatchProcessor ;
18- use solana_svm:: transaction_processor:: TransactionProcessingConfig ;
19- use solana_svm:: transaction_processor:: TransactionProcessingEnvironment ;
20-
21- use solana_compute_budget:: compute_budget:: ComputeBudget ;
2215
2316use crate :: accounts_db:: AccountsDB ;
2417use crate :: trident_fork_graphs:: TridentForkGraph ;
2518
26- pub struct TridentSVM < ' a > {
19+ pub struct TridentSVM {
2720 pub ( crate ) accounts : AccountsDB ,
2821 pub ( crate ) payer : Keypair ,
2922 pub ( crate ) feature_set : Arc < FeatureSet > ,
3023 pub ( crate ) processor : TransactionBatchProcessor < TridentForkGraph > ,
3124 pub ( crate ) fork_graph : Arc < RwLock < TridentForkGraph > > ,
32- pub ( crate ) tx_processing_environment : TransactionProcessingEnvironment < ' a > ,
33- pub ( crate ) tx_processing_config : TransactionProcessingConfig < ' a > ,
3425}
3526
36- impl TransactionProcessingCallback for TridentSVM < ' _ > {
27+ impl TransactionProcessingCallback for TridentSVM {
3728 fn account_matches_owners ( & self , account : & Pubkey , owners : & [ Pubkey ] ) -> Option < usize > {
3829 self . get_account_shared_data ( account)
3930 . and_then ( |account| owners. iter ( ) . position ( |key| account. owner ( ) . eq ( key) ) )
@@ -47,38 +38,16 @@ impl TransactionProcessingCallback for TridentSVM<'_> {
4738 }
4839}
4940
50- impl Default for TridentSVM < ' _ > {
41+ impl Default for TridentSVM {
5142 fn default ( ) -> Self {
5243 let payer = Keypair :: new ( ) ;
5344
54- let fee_structure = FeeStructure :: default ( ) ;
55- let lamports_per_signature = fee_structure. lamports_per_signature ;
56-
5745 let mut client = Self {
5846 accounts : Default :: default ( ) ,
5947 payer : payer. insecure_clone ( ) ,
6048 feature_set : Arc :: new ( FeatureSet :: all_enabled ( ) ) ,
6149 processor : TransactionBatchProcessor :: < TridentForkGraph > :: new ( 1 , 1 , HashSet :: default ( ) ) ,
6250 fork_graph : Arc :: new ( RwLock :: new ( TridentForkGraph { } ) ) ,
63- tx_processing_config : TransactionProcessingConfig {
64- compute_budget : Some ( ComputeBudget :: default ( ) ) ,
65- log_messages_bytes_limit : Some ( 10 * 1000 ) ,
66- recording_config : ExecutionRecordingConfig {
67- enable_cpi_recording : true ,
68- enable_log_recording : true ,
69- enable_return_data_recording : true ,
70- } ,
71- ..Default :: default ( )
72- } ,
73- tx_processing_environment : TransactionProcessingEnvironment {
74- blockhash : Hash :: default ( ) ,
75- epoch_total_stake : None ,
76- epoch_vote_accounts : None ,
77- feature_set : Arc :: new ( FeatureSet :: all_enabled ( ) ) ,
78- fee_structure : None ,
79- lamports_per_signature,
80- rent_collector : None ,
81- } ,
8251 } ;
8352
8453 let payer_account = AccountSharedData :: new (
0 commit comments