@@ -759,7 +759,7 @@ impl<'a, Ext, Db: Database + DatabaseCommit> EvmNeedsBlock<'a, Ext, Db> {
759
759
) -> Result < EvmNeedsTx < ' a , Ext , Db , C > , EvmErrored < ' a , Ext , Db , C > >
760
760
where
761
761
B : Block ,
762
- C : BlockContext ,
762
+ C : BlockContext < Ext > ,
763
763
Db : Database + DatabaseCommit ,
764
764
{
765
765
let res = context. open_block ( self . inner_mut_unchecked ( ) , filler) ;
@@ -774,12 +774,12 @@ impl<'a, Ext, Db: Database + DatabaseCommit> EvmNeedsBlock<'a, Ext, Db> {
774
774
/// block.
775
775
pub fn drive_block < ' b , B , C > ( self , driver : & ' b B ) -> DriveBlockResult < ' a , ' b , Ext , Db , C , B >
776
776
where
777
- C : BlockContext ,
778
- B : BlockDriver < ' b , C > ,
777
+ C : BlockContext < Ext > ,
778
+ B : BlockDriver < ' b , Ext , C > ,
779
779
{
780
780
let trevm = self
781
781
. open_block ( driver. block ( ) , driver. context ( ) )
782
- . map_err ( EvmErrored :: err_into :: < <B as BlockDriver < ' b , C > >:: Error < Db > > ) ?;
782
+ . map_err ( EvmErrored :: err_into :: < <B as BlockDriver < ' b , Ext , C > >:: Error < Db > > ) ?;
783
783
let trevm = driver. run_txns ( trevm) ?;
784
784
785
785
let trevm = trevm. close_block ( ) . map_err ( EvmErrored :: err_into) ?;
@@ -798,15 +798,15 @@ impl<'a, Ext, Db: Database + DatabaseCommit> EvmNeedsBlock<'a, Ext, Db> {
798
798
/// If the driver contains no blocks.
799
799
pub fn drive_chain < ' b , D , C > ( self , driver : & ' b mut D ) -> DriveChainResult < ' a , ' b , Ext , Db , C , D >
800
800
where
801
- D : ChainDriver < ' b , C > ,
802
- C : BlockContext ,
801
+ D : ChainDriver < ' b , Ext , C > ,
802
+ C : BlockContext < Ext > ,
803
803
{
804
804
let block_count = driver. blocks ( ) . len ( ) ;
805
805
let mut contexts = Vec :: with_capacity ( block_count) ;
806
806
807
807
let trevm = self
808
808
. drive_block ( & driver. blocks ( ) [ 0 ] )
809
- . map_err ( EvmErrored :: err_into :: < <D as ChainDriver < ' b , C > >:: Error < Db > > ) ?;
809
+ . map_err ( EvmErrored :: err_into :: < <D as ChainDriver < ' b , Ext , C > >:: Error < Db > > ) ?;
810
810
811
811
if let Err ( e) = driver. check_interblock ( & trevm, 0 ) {
812
812
return Err ( trevm. errored ( e) ) ;
@@ -820,7 +820,7 @@ impl<'a, Ext, Db: Database + DatabaseCommit> EvmNeedsBlock<'a, Ext, Db> {
820
820
( context, trevm) = {
821
821
let trevm = trevm
822
822
. drive_block ( & driver. blocks ( ) [ i] )
823
- . map_err ( EvmErrored :: err_into :: < <D as ChainDriver < ' b , C > >:: Error < Db > > ) ?;
823
+ . map_err ( EvmErrored :: err_into :: < <D as ChainDriver < ' b , Ext , C > >:: Error < Db > > ) ?;
824
824
if let Err ( e) = driver. check_interblock ( & trevm, i) {
825
825
return Err ( trevm. errored ( e) ) ;
826
826
}
@@ -936,7 +936,7 @@ impl<'a, Ext, Db: Database + DatabaseCommit, TrevmState: HasContext>
936
936
error : E ,
937
937
) -> EvmErrored < ' a , Ext , Db , <TrevmState as HasContext >:: Context , E >
938
938
where
939
- <TrevmState as HasContext >:: Context : BlockContext ,
939
+ <TrevmState as HasContext >:: Context : BlockContext < Ext > ,
940
940
{
941
941
EvmErrored {
942
942
inner : self . inner ,
@@ -947,7 +947,7 @@ impl<'a, Ext, Db: Database + DatabaseCommit, TrevmState: HasContext>
947
947
948
948
// --- NEEDS TX
949
949
950
- impl < ' a , Ext , Db : Database + DatabaseCommit , C : BlockContext > EvmNeedsTx < ' a , Ext , Db , C > {
950
+ impl < ' a , Ext , Db : Database + DatabaseCommit , C : BlockContext < Ext > > EvmNeedsTx < ' a , Ext , Db , C > {
951
951
/// Close the current block, applying some logic, and returning the EVM
952
952
/// ready for the next block.
953
953
///
@@ -1015,7 +1015,7 @@ impl<'a, Ext, Db: Database + DatabaseCommit, TrevmState: HasTx> Trevm<'a, Ext, D
1015
1015
1016
1016
// --- READY
1017
1017
1018
- impl < ' a , Ext , Db : Database + DatabaseCommit , C : BlockContext > EvmReady < ' a , Ext , Db , C > {
1018
+ impl < ' a , Ext , Db : Database + DatabaseCommit , C : BlockContext < Ext > > EvmReady < ' a , Ext , Db , C > {
1019
1019
/// Clear the current transaction environment.
1020
1020
pub fn clear_tx ( self ) -> EvmNeedsTx < ' a , Ext , Db , C > {
1021
1021
// NB: we do not clear the tx env here, as we may read it during `BlockContext::post_tx`
@@ -1047,7 +1047,9 @@ impl<'a, Ext, Db: Database + DatabaseCommit, C: BlockContext> EvmReady<'a, Ext,
1047
1047
1048
1048
// --- ERRORED
1049
1049
1050
- impl < ' a , Ext , Db : Database + DatabaseCommit , C : BlockContext , E > EvmErrored < ' a , Ext , Db , C , E > {
1050
+ impl < ' a , Ext , Db : Database + DatabaseCommit , C : BlockContext < Ext > , E >
1051
+ EvmErrored < ' a , Ext , Db , C , E >
1052
+ {
1051
1053
/// Get a reference to the error.
1052
1054
pub const fn error ( & self ) -> & E {
1053
1055
& self . state . error
@@ -1095,7 +1097,7 @@ impl<'a, Ext, Db: Database + DatabaseCommit, C: BlockContext, E> EvmErrored<'a,
1095
1097
}
1096
1098
}
1097
1099
1098
- impl < ' a , Ext , Db : Database + DatabaseCommit , C : BlockContext >
1100
+ impl < ' a , Ext , Db : Database + DatabaseCommit , C : BlockContext < Ext > >
1099
1101
EvmErrored < ' a , Ext , Db , C , EVMError < Db :: Error > >
1100
1102
{
1101
1103
/// Check if the error is a transaction error. This is provided as a
@@ -1126,23 +1128,23 @@ impl<'a, Ext, Db: Database + DatabaseCommit, C: BlockContext>
1126
1128
1127
1129
// --- TRANSACTED
1128
1130
1129
- impl < ' a , Ext , Db : Database + DatabaseCommit , C : BlockContext > AsRef < ResultAndState >
1131
+ impl < ' a , Ext , Db : Database + DatabaseCommit , C : BlockContext < Ext > > AsRef < ResultAndState >
1130
1132
for EvmTransacted < ' a , Ext , Db , C >
1131
1133
{
1132
1134
fn as_ref ( & self ) -> & ResultAndState {
1133
1135
& self . state . result
1134
1136
}
1135
1137
}
1136
1138
1137
- impl < ' a , Ext , Db : Database + DatabaseCommit , C : BlockContext > AsRef < ExecutionResult >
1139
+ impl < ' a , Ext , Db : Database + DatabaseCommit , C : BlockContext < Ext > > AsRef < ExecutionResult >
1138
1140
for EvmTransacted < ' a , Ext , Db , C >
1139
1141
{
1140
1142
fn as_ref ( & self ) -> & ExecutionResult {
1141
1143
& self . state . result . result
1142
1144
}
1143
1145
}
1144
1146
1145
- impl < ' a , Ext , Db : Database + DatabaseCommit , C : BlockContext > EvmTransacted < ' a , Ext , Db , C > {
1147
+ impl < ' a , Ext , Db : Database + DatabaseCommit , C : BlockContext < Ext > > EvmTransacted < ' a , Ext , Db , C > {
1146
1148
/// Get a reference to the result.
1147
1149
pub fn result ( & self ) -> & ExecutionResult {
1148
1150
self . as_ref ( )
0 commit comments