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

Method start

plugins/src/lib.rs:447–453  ·  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

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,

Callers 11

mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
initFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls 4

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

Tested by

no test coverage detected