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

Function ignore_and_complete

plugins/libplugin.c:287–311  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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