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

Function begin_request

plugins/askrene/askrene.c:868–888  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

866}
867
868static struct command_result *begin_request(struct askrene *askrene,
869 struct getroutes_info *info)
870{
871 askrene->num_live_requests++;
872
873 /* Wake any waiting ones when we're finished */
874 tal_add_destructor(info->cmd, destroy_live_command);
875
876 if (have_layer(info->layers, "auto.localchans")) {
877 struct out_req *req;
878
879 req = jsonrpc_request_start(info->cmd,
880 "listpeerchannels",
881 listpeerchannels_done,
882 forward_error, info);
883 return send_outreq(req);
884 } else
885 info->local_layer = NULL;
886
887 return do_getroutes(info->cmd, gossmap_localmods_new(info->cmd), info);
888}
889
890static struct command_result *json_getroutes(struct command *cmd,
891 const char *buffer,

Callers 2

destroy_live_commandFunction · 0.85
json_getroutesFunction · 0.85

Calls 4

have_layerFunction · 0.85
do_getroutesFunction · 0.85
gossmap_localmods_newFunction · 0.85
send_outreqFunction · 0.50

Tested by

no test coverage detected