mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: Add Transaction AT to ConfigureEvm (#13106)
This commit is contained in:
@ -50,7 +50,7 @@
|
||||
//! Network: NetworkInfo + Peers + Clone + 'static,
|
||||
//! Events:
|
||||
//! CanonStateSubscriptions<Primitives = reth_primitives::EthPrimitives> + Clone + 'static,
|
||||
//! EvmConfig: ConfigureEvm<Header = Header>,
|
||||
//! EvmConfig: ConfigureEvm<Header = Header, Transaction = TransactionSigned>,
|
||||
//! BlockExecutor: BlockExecutorProvider<Primitives = Events::Primitives>,
|
||||
//! Consensus: reth_consensus::FullConsensus + Clone + 'static,
|
||||
//! {
|
||||
@ -135,7 +135,7 @@
|
||||
//! CanonStateSubscriptions<Primitives = reth_primitives::EthPrimitives> + Clone + 'static,
|
||||
//! EngineApi: EngineApiServer<EngineT>,
|
||||
//! EngineT: EngineTypes,
|
||||
//! EvmConfig: ConfigureEvm<Header = Header>,
|
||||
//! EvmConfig: ConfigureEvm<Header = Header, Transaction = TransactionSigned>,
|
||||
//! BlockExecutor: BlockExecutorProvider<Primitives = Events::Primitives>,
|
||||
//! Consensus: reth_consensus::FullConsensus + Clone + 'static,
|
||||
//! {
|
||||
|
||||
@ -16,6 +16,7 @@ workspace = true
|
||||
revm.workspace = true
|
||||
revm-inspectors.workspace = true
|
||||
revm-primitives = { workspace = true, features = ["dev"] }
|
||||
reth-primitives-traits.workspace = true
|
||||
reth-errors.workspace = true
|
||||
reth-evm.workspace = true
|
||||
reth-primitives.workspace = true
|
||||
|
||||
@ -19,7 +19,7 @@ use futures::Future;
|
||||
use reth_chainspec::EthChainSpec;
|
||||
use reth_evm::{ConfigureEvm, ConfigureEvmEnv};
|
||||
use reth_node_api::BlockBody;
|
||||
use reth_primitives::TransactionSigned;
|
||||
use reth_primitives_traits::SignedTransaction;
|
||||
use reth_provider::{BlockIdReader, ChainSpecProvider, HeaderProvider};
|
||||
use reth_revm::{
|
||||
database::StateProviderDatabase,
|
||||
@ -664,14 +664,15 @@ pub trait Call: LoadState<Evm: ConfigureEvm<Header = Header>> + SpawnBlocking {
|
||||
where
|
||||
DB: Database + DatabaseCommit,
|
||||
EthApiError: From<DB::Error>,
|
||||
I: IntoIterator<Item = (&'a Address, &'a TransactionSigned)>,
|
||||
I: IntoIterator<Item = (&'a Address, &'a <Self::Evm as ConfigureEvmEnv>::Transaction)>,
|
||||
<Self::Evm as ConfigureEvmEnv>::Transaction: SignedTransaction,
|
||||
{
|
||||
let env = EnvWithHandlerCfg::new_with_cfg_env(cfg, block_env, Default::default());
|
||||
|
||||
let mut evm = self.evm_config().evm_with_env(db, env);
|
||||
let mut index = 0;
|
||||
for (sender, tx) in transactions {
|
||||
if tx.hash() == target_tx_hash {
|
||||
if *tx.tx_hash() == target_tx_hash {
|
||||
// reached the target transaction
|
||||
break
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ pub trait LoadPendingBlock:
|
||||
+ ChainSpecProvider<ChainSpec: EthChainSpec + EthereumHardforks>
|
||||
+ StateProviderFactory,
|
||||
Pool: TransactionPool<Transaction: PoolTransaction<Consensus = ProviderTx<Self::Provider>>>,
|
||||
Evm: ConfigureEvm<Header = Header>,
|
||||
Evm: ConfigureEvm<Header = Header, Transaction = ProviderTx<Self::Provider>>,
|
||||
>
|
||||
{
|
||||
/// Returns a handle to the pending block.
|
||||
|
||||
@ -31,7 +31,7 @@ where
|
||||
Pool: TransactionPool<
|
||||
Transaction: PoolTransaction<Consensus = ProviderTx<Self::Provider>>,
|
||||
>,
|
||||
Evm: ConfigureEvm<Header = Header>,
|
||||
Evm: ConfigureEvm<Header = Header, Transaction = ProviderTx<Self::Provider>>,
|
||||
>,
|
||||
{
|
||||
#[inline]
|
||||
|
||||
Reference in New Issue
Block a user