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

Function param_inform

plugins/askrene/askrene.c:1215–1232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1213};
1214
1215static struct command_result *param_inform(struct command *cmd,
1216 const char *name,
1217 const char *buffer,
1218 const jsmntok_t *tok,
1219 enum inform **inform)
1220{
1221 *inform = tal(cmd, enum inform);
1222 if (json_tok_streq(buffer, tok, "constrained"))
1223 **inform = INFORM_CONSTRAINED;
1224 else if (json_tok_streq(buffer, tok, "unconstrained"))
1225 **inform = INFORM_UNCONSTRAINED;
1226 else if (json_tok_streq(buffer, tok, "succeeded"))
1227 **inform = INFORM_SUCCEEDED;
1228 else
1229 return command_fail_badparam(cmd, name, buffer, tok,
1230 "must be constrained/unconstrained/succeeded");
1231 return NULL;
1232}
1233
1234static struct command_result *json_askrene_inform_channel(struct command *cmd,
1235 const char *buffer,

Callers

nothing calls this directly

Calls 2

json_tok_streqFunction · 0.85
command_fail_badparamFunction · 0.50

Tested by

no test coverage detected