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

Function checkrune_done

plugins/commando.c:322–348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320}
321
322static struct command_result *checkrune_done(struct command *cmd,
323 const char *method,
324 const char *buf,
325 const jsmntok_t *result,
326 struct cond_info *cinfo)
327{
328 bool valid;
329 const char *err;
330
331 err = json_scan(cmd, buf, result, "{valid:%}",
332 JSON_SCAN(json_to_bool, &valid));
333 if (err) {
334 plugin_err(plugin, "Invalid checkrune response (%s) %.*s",
335 err,
336 json_tok_full_len(result),
337 json_tok_full(buf, result));
338 }
339
340 /* Shouldn't happen! */
341 if (!valid) {
342 return commando_error(cmd, cinfo->incoming,
343 COMMANDO_ERROR_REMOTE,
344 "Invalid rune");
345 }
346
347 return execute_command(cmd, cinfo);
348}
349
350static struct command_result *checkrune_failed(struct command *cmd,
351 const char *method,

Callers

nothing calls this directly

Calls 6

commando_errorFunction · 0.85
execute_commandFunction · 0.85
plugin_errFunction · 0.70
json_scanFunction · 0.50
json_tok_full_lenFunction · 0.50
json_tok_fullFunction · 0.50

Tested by

no test coverage detected