Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/engine/tree/src/tree/payload_processor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ where
let (execute_tx, execute_rx) = mpsc::channel();
self.executor.spawn_blocking(move || {
for tx in transactions {
let tx = tx.map(|tx| WithTxEnv { tx_env: tx.to_tx_env(), tx });
let tx = tx.map(|tx| WithTxEnv { tx_env: tx.to_tx_env(), tx: Arc::new(tx) });
// only send Ok(_) variants to prewarming task
if let Ok(tx) = &tx {
let _ = prewarm_tx.send(tx.clone());
Expand Down
2 changes: 1 addition & 1 deletion crates/engine/tree/src/tree/payload_processor/prewarm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ where
done_tx: Sender<()>,
) -> mpsc::Sender<IndexedTransaction<Tx>>
where
Tx: ExecutableTxFor<Evm> + Clone + Send + 'static,
Tx: ExecutableTxFor<Evm> + Send + 'static,
{
let (tx, rx) = mpsc::channel();
let ctx = self.clone();
Expand Down
4 changes: 2 additions & 2 deletions crates/evm/evm/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ pub trait ExecutableTxIterator<Evm: ConfigureEvm>:
Iterator<Item = Result<Self::Tx, Self::Error>> + Send + 'static
{
/// The executable transaction type iterator yields.
type Tx: ExecutableTxFor<Evm> + Clone + Send + 'static;
type Tx: ExecutableTxFor<Evm> + Clone + Send + Sync + 'static;
/// Errors that may occur while recovering or decoding transactions.
type Error: core::error::Error + Send + Sync + 'static;
}

impl<Evm: ConfigureEvm, Tx, Err, T> ExecutableTxIterator<Evm> for T
where
Tx: ExecutableTxFor<Evm> + Clone + Send + 'static,
Tx: ExecutableTxFor<Evm> + Clone + Send + Sync + 'static,
Err: core::error::Error + Send + Sync + 'static,
T: Iterator<Item = Result<Tx, Err>> + Send + 'static,
{
Expand Down
8 changes: 4 additions & 4 deletions crates/evm/evm/src/execute.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Traits for execution.

use crate::{ConfigureEvm, Database, OnStateHook, TxEnvFor};
use alloc::{boxed::Box, vec::Vec};
use alloc::{boxed::Box, sync::Arc, vec::Vec};
use alloy_consensus::{BlockHeader, Header};
use alloy_eips::eip2718::WithEncoded;
pub use alloy_evm::block::{BlockExecutor, BlockExecutorFactory};
Expand Down Expand Up @@ -447,7 +447,7 @@ impl<Executor: BlockExecutor> ExecutorTx<Executor> for Recovered<Executor::Trans
impl<T, Executor> ExecutorTx<Executor>
for WithTxEnv<<<Executor as BlockExecutor>::Evm as Evm>::Tx, T>
where
T: ExecutorTx<Executor>,
T: ExecutorTx<Executor> + Clone,
Executor: BlockExecutor,
<<Executor as BlockExecutor>::Evm as Evm>::Tx: Clone,
Self: RecoveredTx<Executor::Transaction>,
Expand All @@ -457,7 +457,7 @@ where
}

fn into_recovered(self) -> Recovered<Executor::Transaction> {
self.tx.into_recovered()
Arc::unwrap_or_clone(self.tx).into_recovered()
}
}

Expand Down Expand Up @@ -641,7 +641,7 @@ pub struct WithTxEnv<TxEnv, T> {
/// The transaction environment for EVM.
pub tx_env: TxEnv,
/// The recovered transaction.
pub tx: T,
pub tx: Arc<T>,
}

impl<TxEnv, Tx, T: RecoveredTx<Tx>> RecoveredTx<Tx> for WithTxEnv<TxEnv, T> {
Expand Down