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

Function htlc_accepted_handler

plugins/examples/cln-plugin-reentrant.rs:35–44  ·  view source on GitHub ↗
(
    p: Plugin<State>,
    v: serde_json::Value,
)

Source from the content-addressed store, hash-verified

33}
34
35async fn htlc_accepted_handler(
36 p: Plugin<State>,
37 v: serde_json::Value,
38) -> Result<serde_json::Value, Error> {
39 log::info!("Holding on to incoming HTLC {:?}", v);
40 // Wait for `release` to be called.
41 p.state().tx.subscribe().recv().await.unwrap();
42
43 Ok(json!({"result": "continue"}))
44}

Callers

nothing calls this directly

Calls 4

stateMethod · 0.80
unwrapMethod · 0.45
recvMethod · 0.45
subscribeMethod · 0.45

Tested by

no test coverage detected