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

Function ignore_and_complete

plugins/libplugin.c:286–310  ·  view source on GitHub ↗

Ignore the result, and terminate the timer/aux/hook */

Source from the content-addressed store, hash-verified

284
285/* Ignore the result, and terminate the timer/aux/hook */
286struct command_result *ignore_and_complete(struct command *cmd,
287 const char *method,
288 const char *buf,
289 const jsmntok_t *result,
290 void *arg)
291{
292 switch (cmd->type) {
293 case COMMAND_TYPE_NORMAL:
294 case COMMAND_TYPE_CHECK:
295 case COMMAND_TYPE_USAGE_ONLY:
296 plugin_err(cmd->plugin,
297 "%s: cannot ignore_and_complete type %u",
298 method, cmd->type);
299 case COMMAND_TYPE_HOOK:
300 return command_hook_success(cmd);
301 /* Terminate with aux_command_done */
302 case COMMAND_TYPE_AUX:
303 return aux_command_done(cmd);
304 case COMMAND_TYPE_NOTIFICATION:
305 return notification_handled(cmd);
306 case COMMAND_TYPE_TIMER:
307 return timer_complete(cmd);
308 }
309 abort();
310}
311
312/* Broken the result, and terminate the command */
313struct command_result *log_broken_and_complete(struct command *cmd,

Callers 1

log_broken_and_completeFunction · 0.85

Calls 6

aux_command_doneFunction · 0.85
timer_completeFunction · 0.85
abortFunction · 0.85
plugin_errFunction · 0.70
command_hook_successFunction · 0.70
notification_handledFunction · 0.70

Tested by

no test coverage detected