1
1
use crate :: {
2
- db :: ConcurrentState , driver:: DriveBlockResult , Block , BlockDriver , BundleDriver , Cfg ,
3
- ChainDriver , DriveBundleResult , DriveChainResult , ErroredState , EvmErrored , EvmExtUnchecked ,
4
- EvmNeedsBlock , EvmNeedsCfg , EvmNeedsTx , EvmReady , EvmTransacted , HasBlock , HasCfg , HasTx ,
5
- NeedsCfg , NeedsTx , TransactedState , Tx ,
2
+ driver:: DriveBlockResult , Block , BlockDriver , BundleDriver , Cfg , ChainDriver ,
3
+ DriveBundleResult , DriveChainResult , ErroredState , EvmErrored , EvmExtUnchecked , EvmNeedsBlock ,
4
+ EvmNeedsCfg , EvmNeedsTx , EvmReady , EvmTransacted , HasBlock , HasCfg , HasTx , NeedsCfg , NeedsTx ,
5
+ TransactedState , Tx ,
6
6
} ;
7
7
use alloc:: { boxed:: Box , fmt} ;
8
8
use alloy_primitives:: { Address , Bytes , U256 } ;
@@ -20,8 +20,8 @@ use revm::{
20
20
///
21
21
/// See the [crate-level documentation](crate) for more information.
22
22
pub struct Trevm < ' a , Ext , Db : Database + DatabaseCommit , TrevmState > {
23
- inner : Box < Evm < ' a , Ext , Db > > ,
24
- state : TrevmState ,
23
+ pub ( crate ) inner : Box < Evm < ' a , Ext , Db > > ,
24
+ pub ( crate ) state : TrevmState ,
25
25
}
26
26
27
27
impl < Ext , Db : Database + DatabaseCommit , TrevmState > fmt:: Debug for Trevm < ' _ , Ext , Db , TrevmState > {
@@ -440,7 +440,7 @@ impl<Ext, Db: Database<Error = Infallible> + DatabaseCommit, TrevmState>
440
440
}
441
441
}
442
442
443
- // --- ALL STATES, WITH State<Db> or ConcurrentState<Db>
443
+ // --- ALL STATES, WITH State<Db>
444
444
445
445
impl < Ext , Db : Database + DatabaseCommit , TrevmState > Trevm < ' _ , Ext , State < Db > , TrevmState > {
446
446
/// Set the [EIP-161] state clear flag, activated in the Spurious Dragon
@@ -450,14 +450,6 @@ impl<Ext, Db: Database + DatabaseCommit, TrevmState> Trevm<'_, Ext, State<Db>, T
450
450
}
451
451
}
452
452
453
- impl < Ext , Db : DatabaseRef , TrevmState > Trevm < ' _ , Ext , ConcurrentState < Db > , TrevmState > {
454
- /// Set the [EIP-161] state clear flag, activated in the Spurious Dragon
455
- /// hardfork.
456
- pub fn set_state_clear_flag ( & mut self , flag : bool ) {
457
- self . inner . db_mut ( ) . set_state_clear_flag ( flag)
458
- }
459
- }
460
-
461
453
// --- NEEDS CFG
462
454
463
455
impl < ' a , Ext , Db : Database + DatabaseCommit > EvmNeedsCfg < ' a , Ext , Db > {
@@ -886,7 +878,7 @@ impl<'a, Ext, Db: Database + DatabaseCommit, TrevmState: HasBlock> Trevm<'a, Ext
886
878
}
887
879
}
888
880
889
- // --- Needs Block with State<Db> or ConcurrentState<Db>
881
+ // --- Needs Block with State<Db>
890
882
891
883
impl < Ext , Db : Database > EvmNeedsBlock < ' _ , Ext , State < Db > > {
892
884
/// Finish execution and return the outputs.
@@ -905,23 +897,6 @@ impl<Ext, Db: Database> EvmNeedsBlock<'_, Ext, State<Db>> {
905
897
}
906
898
}
907
899
908
- impl < ' a , Ext , Db : DatabaseRef > EvmNeedsBlock < ' a , Ext , ConcurrentState < Db > > {
909
- /// Finish execution and return the outputs.
910
- ///
911
- /// ## Panics
912
- ///
913
- /// If the State has not been built with StateBuilder::with_bundle_update.
914
- ///
915
- /// See [`State::merge_transitions`] and [`State::take_bundle`].
916
- pub fn finish ( self ) -> BundleState {
917
- let Self { inner : mut evm, .. } = self ;
918
- evm. db_mut ( ) . merge_transitions ( BundleRetention :: Reverts ) ;
919
- let bundle = evm. db_mut ( ) . take_bundle ( ) ;
920
-
921
- bundle
922
- }
923
- }
924
-
925
900
// --- NEEDS TX
926
901
927
902
impl < ' a , Ext , Db : Database + DatabaseCommit > EvmNeedsTx < ' a , Ext , Db > {
0 commit comments