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

Function checkrune_done

plugins/commando.c:319–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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