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

Function param_reserve_path

plugins/askrene/askrene.c:177–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177static struct command_result *param_reserve_path(struct command *cmd,
178 const char *name,
179 const char *buffer,
180 const jsmntok_t *tok,
181 struct reserve_hop **path)
182{
183 size_t i;
184 const jsmntok_t *t;
185
186 if (tok->type != JSMN_ARRAY)
187 return command_fail_badparam(cmd, name, buffer, tok, "should be an array");
188
189 *path = tal_arr(cmd, struct reserve_hop, tok->size);
190 json_for_each_arr(i, t, tok) {
191 struct command_result *ret;
192
193 ret = parse_reserve_hop(cmd, name, buffer, t, &(*path)[i]);
194 if (ret)
195 return ret;
196 }
197 return NULL;
198}
199
200static fp16_t *get_capacities(const tal_t *ctx,
201 struct plugin *plugin, struct gossmap *gossmap)

Callers

nothing calls this directly

Calls 2

parse_reserve_hopFunction · 0.85
command_fail_badparamFunction · 0.50

Tested by

no test coverage detected