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

Function command_finished

plugins/libplugin.c:506–525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

504}
505
506struct command_result *command_finished(struct command *cmd,
507 struct json_stream *response)
508{
509 assert(cmd->type == COMMAND_TYPE_NORMAL
510 || cmd->type == COMMAND_TYPE_HOOK
511 || cmd->type == COMMAND_TYPE_CHECK);
512
513 /* Detach filter before it complains about closing object it never saw */
514 if (cmd->filter) {
515 const char *err = json_stream_detach_filter(tmpctx, response);
516 if (err)
517 json_add_string(response, "warning_parameter_filter",
518 err);
519 }
520
521 /* "result" or "error" object */
522 json_object_end(response);
523
524 return command_complete(cmd, response);
525}
526
527struct command_result *command_finish_rawstr(struct command *cmd,
528 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