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

Function command_finished

plugins/libplugin.c:496–515  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

494}
495
496struct command_result *command_finished(struct command *cmd,
497 struct json_stream *response)
498{
499 assert(cmd->type == COMMAND_TYPE_NORMAL
500 || cmd->type == COMMAND_TYPE_HOOK
501 || cmd->type == COMMAND_TYPE_CHECK);
502
503 /* Detach filter before it complains about closing object it never saw */
504 if (cmd->filter) {
505 const char *err = json_stream_detach_filter(tmpctx, response);
506 if (err)
507 json_add_string(response, "warning_parameter_filter",
508 err);
509 }
510
511 /* "result" or "error" object */
512 json_object_end(response);
513
514 return command_complete(cmd, response);
515}
516
517struct command_result *command_finish_rawstr(struct command *cmd,
518 const char *json,

Callers 15

refresh_completeFunction · 0.70
json_listsqlschemasFunction · 0.70
htlc_accepted_continueFunction · 0.70
sendpsbt_doneFunction · 0.70
finish_txprepareFunction · 0.70
unreserve_doneFunction · 0.70
listfunds_doneFunction · 0.70
json_paystatusFunction · 0.70
on_payment_successFunction · 0.70
on_payment_failureFunction · 0.70
selfpay_successFunction · 0.70

Calls 4

json_object_endFunction · 0.85
command_completeFunction · 0.85
json_add_stringFunction · 0.50

Tested by 2

json_peer_connectedFunction · 0.40
testrpc_cbFunction · 0.40