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

Function init

plugins/pay.c:578–594  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

576#endif
577
578static const char *init(struct plugin *p,
579 const char *buf UNUSED, const jsmntok_t *config UNUSED)
580{
581 rpc_scan(p, "getinfo", take(json_out_obj(NULL, NULL, NULL)),
582 "{id:%}", JSON_SCAN(json_to_node_id, &my_id));
583
584 rpc_scan(p, "listconfigs",
585 take(json_out_obj(NULL, NULL, NULL)),
586 "{max-locktime-blocks:%,experimental-offers:%}",
587 JSON_SCAN(json_to_number, &maxdelay_default),
588 JSON_SCAN(json_to_bool, &exp_offers));
589
590#if DEVELOPER
591 plugin_set_memleak_handler(p, memleak_mark_payments);
592#endif
593 return NULL;
594}
595
596static void on_payment_success(struct payment *payment)
597{

Callers

nothing calls this directly

Calls 3

rpc_scanFunction · 0.85
json_out_objFunction · 0.85

Tested by

no test coverage detected