refactor: dedup runtime initializations (#22263)

Co-authored-by: Alexey Shekhirin <github@shekhirin.com>
This commit is contained in:
DaniPopes
2026-02-17 18:35:31 +01:00
committed by GitHub
parent 6ff4f947c8
commit 0ba685386d
72 changed files with 275 additions and 318 deletions

View File

@@ -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)

View File

@@ -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() };