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

Function destroy_live_command

plugins/askrene/askrene.c:852–866  ·  view source on GitHub ↗

One is finished. Maybe wake up a waiter */

Source from the content-addressed store, hash-verified

850
851/* One is finished. Maybe wake up a waiter */
852static void destroy_live_command(struct command *cmd)
853{
854 struct askrene *askrene = get_askrene(cmd->plugin);
855 struct getroutes_info *info;
856
857 assert(askrene->num_live_requests > 0);
858 askrene->num_live_requests--;
859
860 if (askrene->num_live_requests >= askrene->max_children)
861 return;
862
863 info = list_pop(&askrene->waiters, struct getroutes_info, list);
864 if (info)
865 begin_request(askrene, info);
866}
867
868static struct command_result *begin_request(struct askrene *askrene,
869 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