mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-11 00:08:13 -05:00
switch to static lifetime
This commit is contained in:
@@ -40,9 +40,9 @@ impl<EvmConfig> ExecutorFactory for EvmProcessorFactory<EvmConfig>
|
||||
where
|
||||
EvmConfig: ConfigureEvmEnv + Send + Sync + Clone + 'static,
|
||||
{
|
||||
type Executor<'a> = EVMProcessor<'a, EvmConfig>;
|
||||
type Executor = EVMProcessor<'static, EvmConfig>;
|
||||
|
||||
fn with_state<'a, SP: StateProvider + 'a>(&'a self, sp: SP) -> Self::Executor<'a> {
|
||||
fn with_state<SP: StateProvider + 'static>(&self, sp: SP) -> Self::Executor {
|
||||
let database_state = StateProviderDatabase::new(sp);
|
||||
let mut evm = EVMProcessor::new_with_db(
|
||||
self.chain_spec.clone(),
|
||||
|
||||
@@ -70,9 +70,9 @@ impl TestExecutorFactory {
|
||||
}
|
||||
|
||||
impl ExecutorFactory for TestExecutorFactory {
|
||||
type Executor<'a> = TestExecutor;
|
||||
type Executor = TestExecutor;
|
||||
|
||||
fn with_state<'a, SP: StateProvider + 'a>(&'a self, _sp: SP) -> Self::Executor<'a> {
|
||||
fn with_state<SP: StateProvider>(&self, _sp: SP) -> Self::Executor {
|
||||
let exec_res = self.exec_results.lock().pop();
|
||||
TestExecutor(exec_res)
|
||||
}
|
||||
|
||||
@@ -12,10 +12,10 @@ use tracing::debug;
|
||||
pub trait ExecutorFactory: Send + Sync + 'static {
|
||||
/// Type of block executor to return, this must be an associated type so the executor can be
|
||||
/// consumed when it's done executing.
|
||||
type Executor<'a>: PrunableBlockExecutor;
|
||||
type Executor: PrunableBlockExecutor;
|
||||
|
||||
/// Executor with [`StateProvider`]
|
||||
fn with_state<'a, SP: StateProvider + 'a>(&'a self, _sp: SP) -> Self::Executor<'a>;
|
||||
fn with_state<SP: StateProvider + 'static>(&self, _sp: SP) -> Self::Executor;
|
||||
}
|
||||
|
||||
/// An executor capable of executing a block.
|
||||
|
||||
Reference in New Issue
Block a user