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

Function destroy_live_command

plugins/askrene/askrene.c:906–920  ·  view source on GitHub ↗

One is finished. Maybe wake up a waiter */

Source from the content-addressed store, hash-verified

904
905/* One is finished. Maybe wake up a waiter */
906static void destroy_live_command(struct command *cmd)
907{
908 struct askrene *askrene = get_askrene(cmd->plugin);
909 struct getroutes_info *info;
910
911 assert(askrene->num_live_requests > 0);
912 askrene->num_live_requests--;
913
914 if (askrene->num_live_requests >= askrene->max_children)
915 return;
916
917 info = list_pop(&askrene->waiters, struct getroutes_info, list);
918 if (info)
919 begin_request(askrene, info);
920}
921
922static struct command_result *begin_request(struct askrene *askrene,
923 struct getroutes_info *info)

Callers

nothing calls this directly

Calls 2

get_askreneFunction · 0.85
begin_requestFunction · 0.85

Tested by

no test coverage detected