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

Function hook_fallback

plugins/src/lib.rs:875–896  ·  view source on GitHub ↗
(hookname: &str)

Source from the content-addressed store, hash-verified

873}
874
875fn hook_fallback(hookname: &str) -> Option<serde_json::Value> {
876 match hookname {
877 "htlc_accepted" => Some(json!({
878 "result": "fail",
879 "failure_message": "2002"
880 })),
881 "peer_connected"
882 | "invoice_payment"
883 | "rpc_command"
884 | "custommsg"
885 | "onion_message_recv"
886 | "onion_message_recv_secret"
887 | "recover" => Some(json!({"result": "continue"})),
888 "openchannel"
889 | "openchannel2"
890 | "openchannel2_changed"
891 | "openchannel2_sign"
892 | "rbf_channel" => Some(json!({"result": "reject"})),
893 // commitment_revocation and db_write cannot recover from failing, let lightningd crash
894 _ => None,
895 }
896}
897
898impl<S> PluginDriver<S>
899where

Callers 1

dispatch_oneMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected