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

Function init

plugins/keysend.c:133–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133static const char *init(struct command *init_cmd, const char *buf UNUSED,
134 const jsmntok_t *config UNUSED)
135{
136 rpc_scan(init_cmd, "getinfo", take(json_out_obj(NULL, NULL, NULL)), "{id:%}",
137 JSON_SCAN(json_to_node_id, &my_id));
138
139 global_hints = notleak_with_children(channel_hint_set_new(init_cmd->plugin));
140
141 accepted_extra_tlvs = notleak(tal_arr(NULL, u64, 0));
142 rpc_scan(init_cmd, "listconfigs", take(json_out_obj(NULL, NULL, NULL)),
143 "{configs:{"
144 "accept-htlc-tlv-type:{values_int:%}}}",
145 JSON_SCAN(jsonarr_accumulate_u64, &accepted_extra_tlvs));
146
147 return NULL;
148}
149
150struct payment_modifier *pay_mods[] = {
151 &keysend_pay_mod,

Callers

nothing calls this directly

Calls 3

channel_hint_set_newFunction · 0.85
rpc_scanFunction · 0.70
json_out_objFunction · 0.70

Tested by

no test coverage detected