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

Function param_forward_delstatus

lightningd/forwards.c:237–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235AUTODATA(json_command, &listforwards_command);
236
237static struct command_result *param_forward_delstatus(struct command *cmd,
238 const char *name,
239 const char *buffer,
240 const jsmntok_t *tok,
241 enum forward_status **status)
242{
243 struct command_result *ret;
244
245 ret = param_forward_status(cmd, name, buffer, tok, status);
246 if (ret)
247 return ret;
248
249 switch (**status) {
250 case FORWARD_OFFERED:
251 return command_fail_badparam(cmd, name, buffer, tok,
252 "delforward status cannot be offered");
253 case FORWARD_ANY:
254 return command_fail_badparam(cmd, name, buffer, tok,
255 "delforward status cannot be any");
256 case FORWARD_SETTLED:
257 case FORWARD_FAILED:
258 case FORWARD_LOCAL_FAILED:
259 return NULL;
260 }
261 abort();
262}
263
264static struct command_result *json_delforward(struct command *cmd,
265 const char *buffer,

Callers

nothing calls this directly

Calls 3

param_forward_statusFunction · 0.85
abortFunction · 0.85
command_fail_badparamFunction · 0.50

Tested by

no test coverage detected