2
2
//! methods.
3
3
4
4
use futures:: Future ;
5
- use reth_evm:: ConfigureEvm ;
6
- use reth_primitives:: { revm:: env:: tx_env_with_recovered, Bytes , TxKind , B256 , U256 } ;
5
+ use reth_evm:: { ConfigureEvm , ConfigureEvmEnv } ;
6
+ use reth_primitives:: {
7
+ revm:: env:: tx_env_with_recovered,
8
+ revm_primitives:: {
9
+ BlockEnv , CfgEnvWithHandlerCfg , EnvWithHandlerCfg , ExecutionResult , HaltReason ,
10
+ ResultAndState , TransactTo ,
11
+ } ,
12
+ Bytes , TransactionSignedEcRecovered , TxKind , B256 , U256 ,
13
+ } ;
7
14
use reth_provider:: StateProvider ;
8
15
use reth_revm:: { database:: StateProviderDatabase , db:: CacheDB , DatabaseRef } ;
9
16
use reth_rpc_types:: {
@@ -12,10 +19,6 @@ use reth_rpc_types::{
12
19
} ;
13
20
use revm:: { Database , DatabaseCommit } ;
14
21
use revm_inspectors:: access_list:: AccessListInspector ;
15
- use revm_primitives:: {
16
- BlockEnv , CfgEnvWithHandlerCfg , EnvWithHandlerCfg , ExecutionResult , HaltReason , ResultAndState ,
17
- TransactTo ,
18
- } ;
19
22
use tracing:: trace;
20
23
21
24
use crate :: eth:: {
@@ -24,7 +27,6 @@ use crate::eth::{
24
27
revm_utils:: {
25
28
apply_state_overrides, build_call_evm_env, caller_gas_allowance,
26
29
cap_tx_gas_limit_with_caller_allowance, get_precompiles, prepare_call_env, EvmOverrides ,
27
- FillableTransaction ,
28
30
} ,
29
31
} ;
30
32
@@ -444,19 +446,17 @@ pub trait Call: LoadState + SpawnBlocking {
444
446
///
445
447
/// Note: This assumes the target transaction is in the given iterator.
446
448
/// Returns the index of the target transaction in the given iterator.
447
- fn replay_transactions_until < DB , I , Tx > (
449
+ fn replay_transactions_until < DB > (
448
450
& self ,
449
451
db : & mut CacheDB < DB > ,
450
452
cfg : CfgEnvWithHandlerCfg ,
451
453
block_env : BlockEnv ,
452
- transactions : I ,
454
+ transactions : impl IntoIterator < Item = TransactionSignedEcRecovered > ,
453
455
target_tx_hash : B256 ,
454
456
) -> Result < usize , EthApiError >
455
457
where
456
458
DB : DatabaseRef ,
457
459
EthApiError : From < <DB as DatabaseRef >:: Error > ,
458
- I : IntoIterator < Item = Tx > ,
459
- Tx : FillableTransaction ,
460
460
{
461
461
let env = EnvWithHandlerCfg :: new_with_cfg_env ( cfg, block_env, Default :: default ( ) ) ;
462
462
@@ -468,7 +468,8 @@ pub trait Call: LoadState + SpawnBlocking {
468
468
break
469
469
}
470
470
471
- tx. try_fill_tx_env ( evm. tx_mut ( ) ) ?;
471
+ let sender = tx. signer ( ) ;
472
+ self . evm_config ( ) . fill_tx_env ( evm. tx_mut ( ) , & tx. into_signed ( ) , sender) ;
472
473
evm. transact_commit ( ) ?;
473
474
index += 1 ;
474
475
}
0 commit comments