Adds a node-started hook that will run after the node has started.
(mut self, hook: F)
| 148 | |
| 149 | /// Adds a node-started hook that will run after the node has started. |
| 150 | pub fn add_node_started_hook<F>(mut self, hook: F) -> Self |
| 151 | where |
| 152 | F: FnOnce(BaseFullNode) -> Result<()> + Send + 'static, |
| 153 | { |
| 154 | self.node_started_hooks.push(Box::new(hook)); |
| 155 | self |
| 156 | } |
| 157 | |
| 158 | /// Installs an `ExEx` extension with the given name and closure. |
| 159 | pub fn install_exex<F, R, E>(mut self, exex_id: impl Into<String>, exex: F) -> Self |