From 6beb53ee107d65c12d3ec8f8bbb70e444954b05c Mon Sep 17 00:00:00 2001 From: Alexey Shekhirin Date: Mon, 8 Apr 2024 18:18:45 +0100 Subject: [PATCH] feat(node-builder): add `install_exex` to `WithLaunchContext` (#7514) --- crates/node-builder/src/builder.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/crates/node-builder/src/builder.rs b/crates/node-builder/src/builder.rs index 69147da358..db1849024f 100644 --- a/crates/node-builder/src/builder.rs +++ b/crates/node-builder/src/builder.rs @@ -1061,6 +1061,26 @@ where self } + /// Installs an ExEx (Execution Extension) in the node. + pub fn install_exex(mut self, exex: F) -> Self + where + F: Fn( + ExExContext< + FullNodeComponentsAdapter< + FullNodeTypesAdapter>, + Components::Pool, + >, + >, + ) -> R + + Send + + 'static, + R: Future> + Send, + E: Future> + Send, + { + self.builder.state.exexs.push(Box::new(exex)); + self + } + /// Launches the node and returns a handle to it. pub async fn launch( self,