@@ -28,10 +28,10 @@ use reth_revm::{
2828 db:: states:: bundle_state:: BundleRetention ,
2929 Evm , State ,
3030} ;
31- use reth_trie:: HashedPostState ;
3231use revm_primitives:: {
3332 db:: { Database , DatabaseCommit } ,
34- BlockEnv , CfgEnvWithHandlerCfg , EVMError , EnvWithHandlerCfg , ResultAndState , TransactTo ,
33+ BlockEnv , CfgEnvWithHandlerCfg , EVMError , EnvWithHandlerCfg , EvmState , ResultAndState ,
34+ TransactTo ,
3535} ;
3636use std:: { collections:: HashMap , num:: NonZeroUsize , sync:: Arc , time:: Instant } ;
3737use tokio:: sync:: mpsc:: UnboundedSender ;
8585 fn bsc_executor < DB > (
8686 & self ,
8787 db : DB ,
88- prefetch_tx : Option < UnboundedSender < HashedPostState > > ,
88+ prefetch_tx : Option < UnboundedSender < EvmState > > ,
8989 ) -> BscBlockExecutor < EvmConfig , DB , P >
9090 where
9191 DB : Database < Error : Into < ProviderError > + std:: fmt:: Display > ,
@@ -133,7 +133,7 @@ where
133133 fn executor < DB > (
134134 & self ,
135135 db : DB ,
136- prefetch_tx : Option < UnboundedSender < HashedPostState > > ,
136+ prefetch_tx : Option < UnboundedSender < EvmState > > ,
137137 ) -> Self :: Executor < DB >
138138 where
139139 DB : Database < Error : Into < ProviderError > + std:: fmt:: Display > ,
@@ -187,7 +187,7 @@ where
187187 & self ,
188188 block : & BlockWithSenders ,
189189 mut evm : Evm < ' _ , Ext , & mut State < DB > > ,
190- tx : Option < UnboundedSender < HashedPostState > > ,
190+ tx : Option < UnboundedSender < EvmState > > ,
191191 ) -> Result < ( Vec < TransactionSigned > , Vec < Receipt > , u64 ) , BlockExecutionError >
192192 where
193193 DB : Database < Error : Into < ProviderError > + std:: fmt:: Display > ,
@@ -241,8 +241,8 @@ where
241241 } ) ?;
242242
243243 if let Some ( tx) = tx. as_ref ( ) {
244- let post_state = HashedPostState :: from_state ( state. clone ( ) ) ;
245- tx. send ( post_state ) . unwrap_or_else ( |err| {
244+ // let post_state = HashedPostState::from_state(state.clone());
245+ tx. send ( state . clone ( ) ) . unwrap_or_else ( |err| {
246246 debug ! ( target: "evm_executor" , ?err, "Failed to send post state to prefetch channel" )
247247 } ) ;
248248 }
@@ -288,7 +288,7 @@ pub struct BscBlockExecutor<EvmConfig, DB, P> {
288288 /// Parlia consensus instance
289289 pub ( crate ) parlia : Arc < Parlia > ,
290290 /// Prefetch channel
291- prefetch_tx : Option < UnboundedSender < HashedPostState > > ,
291+ prefetch_tx : Option < UnboundedSender < EvmState > > ,
292292}
293293
294294impl < EvmConfig , DB , P > BscBlockExecutor < EvmConfig , DB , P > {
@@ -318,7 +318,7 @@ impl<EvmConfig, DB, P> BscBlockExecutor<EvmConfig, DB, P> {
318318 parlia_config : ParliaConfig ,
319319 state : State < DB > ,
320320 provider : P ,
321- tx : UnboundedSender < HashedPostState > ,
321+ tx : UnboundedSender < EvmState > ,
322322 ) -> Self {
323323 let parlia = Arc :: new ( Parlia :: new ( Arc :: clone ( & chain_spec) , parlia_config) ) ;
324324 let shared_provider = Arc :: new ( provider) ;
0 commit comments