MCPcopy Create free account
hub / github.com/ElementsProject/lightning / start

Method start

plugins/src/lib.rs:294–300  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

292 /// we should exit, and not continue running. `start()` returns in
293 /// order to allow user code to perform cleanup if necessary.
294 pub async fn start(self, state: S) -> Result<Option<Plugin<S>>, anyhow::Error> {
295 if let Some(cp) = self.configure().await? {
296 Ok(Some(cp.start(state).await?))
297 } else {
298 Ok(None)
299 }
300 }
301
302 fn handle_get_manifest(
303 &mut self,

Callers 3

mainFunction · 0.45
initFunction · 0.45
mainFunction · 0.45

Calls 4

configureMethod · 0.80
sendMethod · 0.80
channelClass · 0.50
runMethod · 0.45

Tested by

no test coverage detected