@@ -12,14 +12,14 @@ use crate::{
12
12
use reth_chainspec:: { ChainSpec , EthereumHardforks } ;
13
13
use reth_primitives:: {
14
14
constants:: { eip4844:: MAX_BLOBS_PER_BLOCK , ETHEREUM_BLOCK_GAS_LIMIT } ,
15
- Address , GotExpected , InvalidTransactionError , SealedBlock , TxKind , EIP1559_TX_TYPE_ID ,
16
- EIP2930_TX_TYPE_ID , EIP4844_TX_TYPE_ID , LEGACY_TX_TYPE_ID , U256 ,
15
+ GotExpected , InvalidTransactionError , SealedBlock , TxKind , EIP1559_TX_TYPE_ID ,
16
+ EIP2930_TX_TYPE_ID , EIP4844_TX_TYPE_ID , LEGACY_TX_TYPE_ID ,
17
17
} ;
18
18
use reth_provider:: { AccountReader , BlockReaderIdExt , StateProviderFactory } ;
19
19
use reth_tasks:: TaskSpawner ;
20
20
use revm:: {
21
21
interpreter:: gas:: validate_initial_tx_gas,
22
- primitives:: { EnvKzgSettings , SpecId } ,
22
+ primitives:: { AccessListItem , EnvKzgSettings , SpecId } ,
23
23
} ;
24
24
use std:: {
25
25
marker:: PhantomData ,
@@ -712,12 +712,11 @@ pub fn ensure_intrinsic_gas<T: PoolTransaction>(
712
712
transaction : & T ,
713
713
is_shanghai : bool ,
714
714
) -> Result < ( ) , InvalidPoolTransactionError > {
715
- let access_list = transaction. access_list ( ) . map ( |list| list. flattened ( ) ) . unwrap_or_default ( ) ;
716
715
if transaction. gas_limit ( ) <
717
716
calculate_intrinsic_gas_after_merge (
718
717
transaction. input ( ) ,
719
718
& transaction. kind ( ) ,
720
- & access_list,
719
+ transaction . access_list ( ) . map ( |list| list . 0 . as_slice ( ) ) . as_deref ( ) . unwrap_or ( & [ ] ) ,
721
720
is_shanghai,
722
721
)
723
722
{
@@ -734,11 +733,11 @@ pub fn ensure_intrinsic_gas<T: PoolTransaction>(
734
733
pub fn calculate_intrinsic_gas_after_merge (
735
734
input : & [ u8 ] ,
736
735
kind : & TxKind ,
737
- access_list : & [ ( Address , Vec < U256 > ) ] ,
736
+ access_list : & [ AccessListItem ] ,
738
737
is_shanghai : bool ,
739
738
) -> u64 {
740
739
let spec_id = if is_shanghai { SpecId :: SHANGHAI } else { SpecId :: MERGE } ;
741
- validate_initial_tx_gas ( spec_id, input, kind. is_create ( ) , access_list)
740
+ validate_initial_tx_gas ( spec_id, input, kind. is_create ( ) , access_list, 0 )
742
741
}
743
742
744
743
#[ cfg( test) ]
0 commit comments