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

Function param_forward_delstatus

lightningd/peer_htlcs.c:2947–2972  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2945AUTODATA(json_command, &listforwards_command);
2946
2947static struct command_result *param_forward_delstatus(struct command *cmd,
2948 const char *name,
2949 const char *buffer,
2950 const jsmntok_t *tok,
2951 enum forward_status **status)
2952{
2953 struct command_result *ret;
2954
2955 ret = param_forward_status(cmd, name, buffer, tok, status);
2956 if (ret)
2957 return ret;
2958
2959 switch (**status) {
2960 case FORWARD_OFFERED:
2961 return command_fail_badparam(cmd, name, buffer, tok,
2962 "delforward status cannot be offered");
2963 case FORWARD_ANY:
2964 return command_fail_badparam(cmd, name, buffer, tok,
2965 "delforward status cannot be any");
2966 case FORWARD_SETTLED:
2967 case FORWARD_FAILED:
2968 case FORWARD_LOCAL_FAILED:
2969 return NULL;
2970 }
2971 abort();
2972}
2973
2974static struct command_result *json_delforward(struct command *cmd,
2975 const char *buffer,

Callers

nothing calls this directly

Calls 3

param_forward_statusFunction · 0.85
command_fail_badparamFunction · 0.85
abortFunction · 0.85

Tested by

no test coverage detected