@@ -5,7 +5,7 @@ use context_interface::{
5
5
journaled_state:: { AccountLoad , Eip7702CodeLoad } ,
6
6
result:: EVMError ,
7
7
transaction:: TransactionSetter ,
8
- Block , BlockGetter , Cfg , CfgGetter , DatabaseGetter , ErrorGetter , Journal , JournalStateGetter ,
8
+ Block , BlockGetter , Cfg , CfgGetter , DatabaseGetter , ErrorGetter , Journal , JournalGetter ,
9
9
Transaction , TransactionGetter ,
10
10
} ;
11
11
use database_interface:: { Database , EmptyDB } ;
@@ -24,17 +24,17 @@ pub struct Context<
24
24
JOURNAL : Journal < Database = DB > = JournaledState < DB > ,
25
25
CHAIN = ( ) ,
26
26
> {
27
- /// Transaction information
28
- pub tx : TX ,
29
- /// Block information
27
+ /// Block information.
30
28
pub block : BLOCK ,
31
- /// Configurations
29
+ /// Transaction information.
30
+ pub tx : TX ,
31
+ /// Configurations.
32
32
pub cfg : CFG ,
33
- /// EVM State with journaling support and database
33
+ /// EVM State with journaling support and database.
34
34
pub journaled_state : JOURNAL ,
35
- /// Inner context
35
+ /// Inner context.
36
36
pub chain : CHAIN ,
37
- /// Error that happened during execution
37
+ /// Error that happened during execution.
38
38
pub error : Result < ( ) , <DB as Database >:: Error > ,
39
39
}
40
40
@@ -380,22 +380,6 @@ where
380
380
DB : Database ,
381
381
JOURNAL : Journal < Database = DB > ,
382
382
{
383
- type BLOCK = BLOCK ;
384
- type TX = TX ;
385
- type CFG = CFG ;
386
-
387
- fn tx ( & self ) -> & Self :: TX {
388
- & self . tx
389
- }
390
-
391
- fn block ( & self ) -> & Self :: BLOCK {
392
- & self . block
393
- }
394
-
395
- fn cfg ( & self ) -> & Self :: CFG {
396
- & self . cfg
397
- }
398
-
399
383
fn block_hash ( & mut self , requested_number : u64 ) -> Option < B256 > {
400
384
let block_number = as_u64_saturated ! ( * self . block( ) . number( ) ) ;
401
385
@@ -498,7 +482,7 @@ impl<BLOCK, TX, CFG: Cfg, DB: Database, JOURNAL: Journal<Database = DB>, CHAIN>
498
482
}
499
483
}
500
484
501
- impl < BLOCK , TX , SPEC , DB , JOURNAL , CHAIN > JournalStateGetter
485
+ impl < BLOCK , TX , SPEC , DB , JOURNAL , CHAIN > JournalGetter
502
486
for Context < BLOCK , TX , SPEC , DB , JOURNAL , CHAIN >
503
487
where
504
488
DB : Database ,
@@ -509,6 +493,10 @@ where
509
493
fn journal ( & mut self ) -> & mut Self :: Journal {
510
494
& mut self . journaled_state
511
495
}
496
+
497
+ fn journal_ref ( & self ) -> & Self :: Journal {
498
+ & self . journaled_state
499
+ }
512
500
}
513
501
514
502
impl < BLOCK , TX , SPEC , DB , JOURNAL , CHAIN > DatabaseGetter
0 commit comments