mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(node-builder): add install_exex to WithLaunchContext (#7514)
This commit is contained in:
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user