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

Function begin_request

plugins/askrene/askrene.c:922–942  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

920}
921
922static struct command_result *begin_request(struct askrene *askrene,
923 struct getroutes_info *info)
924{
925 askrene->num_live_requests++;
926
927 /* Wake any waiting ones when we're finished */
928 tal_add_destructor(info->cmd, destroy_live_command);
929
930 if (have_layer(info->layers, "auto.localchans")) {
931 struct out_req *req;
932
933 req = jsonrpc_request_start(info->cmd,
934 "listpeerchannels",
935 listpeerchannels_done,
936 forward_error, info);
937 return send_outreq(req);
938 } else
939 info->local_layer = NULL;
940
941 return do_getroutes(info->cmd, gossmap_localmods_new(info->cmd), info);
942}
943
944static struct command_result *json_getroutes(struct command *cmd,
945 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