mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-08 03:01:12 -04:00
refactor: dedup runtime initializations (#22263)
Co-authored-by: Alexey Shekhirin <github@shekhirin.com>
This commit is contained in:
@@ -985,8 +985,8 @@ impl<Node: FullNodeTypes<Types: NodeTypes<ChainSpec: Hardforks>>> BuilderContext
|
||||
self.config().chain.clone(),
|
||||
secret_key,
|
||||
default_peers_path,
|
||||
self.executor.clone(),
|
||||
)
|
||||
.with_task_executor(self.executor.clone())
|
||||
.set_head(self.head);
|
||||
|
||||
Ok(builder)
|
||||
|
||||
@@ -343,10 +343,7 @@ mod test {
|
||||
payload_builder_handle: PayloadBuilderHandle::<EthEngineTypes>::noop(),
|
||||
};
|
||||
|
||||
let task_executor = {
|
||||
let runtime = tokio::runtime::Runtime::new().unwrap();
|
||||
Runtime::with_existing_handle(runtime.handle().clone()).unwrap()
|
||||
};
|
||||
let task_executor = Runtime::test();
|
||||
|
||||
let node = NodeAdapter { components, task_executor, provider: NoopProvider::default() };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user