feat(node-builder): add install_exex to WithLaunchContext (#7514)

This commit is contained in:
Alexey Shekhirin
2024-04-08 18:18:45 +01:00
committed by GitHub
parent 03fa7ee85d
commit 6beb53ee10

View File

@ -1061,6 +1061,26 @@ where
self
}
/// Installs an ExEx (Execution Extension) in the node.
pub fn install_exex<F, R, E>(mut self, exex: F) -> Self
where
F: Fn(
ExExContext<
FullNodeComponentsAdapter<
FullNodeTypesAdapter<Types, DB, RethFullProviderType<DB, Types::Evm>>,
Components::Pool,
>,
>,
) -> R
+ Send
+ 'static,
R: Future<Output = eyre::Result<E>> + Send,
E: Future<Output = eyre::Result<()>> + Send,
{
self.builder.state.exexs.push(Box::new(exex));
self
}
/// Launches the node and returns a handle to it.
pub async fn launch(
self,