Build and start the plugin loop. This performs the handshake and spawns a new task that accepts incoming messages from Core Lightning and dispatches them to the handlers. It only returns after completing the handshake to ensure that the configuration and initialization was successfull. If `lightningd` was called with `--help` we won't get a `Plugin` instance and return `None` instead. This signal
(self, state: S)
| 445 | /// we should exit, and not continue running. `start()` returns in |
| 446 | /// order to allow user code to perform cleanup if necessary. |
| 447 | pub async fn start(self, state: S) -> Result<Option<Plugin<S>>, anyhow::Error> { |
| 448 | if let Some(cp) = self.configure().await? { |
| 449 | Ok(Some(cp.start(state).await?)) |
| 450 | } else { |
| 451 | Ok(None) |
| 452 | } |
| 453 | } |
| 454 | |
| 455 | fn handle_get_manifest( |
| 456 | &mut self, |