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

Function my_command_finish

plugins/renepay/payment.c:290–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288}
289
290static struct command_result *my_command_finish(struct payment *p,
291 struct command *cmd)
292{
293 struct json_stream *result;
294 if (p->status == PAYMENT_SUCCESS) {
295 result = jsonrpc_stream_success(cmd);
296 json_add_payment(result, p);
297 return command_finished(cmd, result);
298 }
299 assert(p->status == PAYMENT_FAIL);
300 assert(p->error_msg);
301 return command_fail(cmd, p->error_code, "%s", p->error_msg);
302}
303
304static struct command_result *payment_finish(struct payment *p)
305{

Callers 1

payment_finishFunction · 0.85

Calls 4

json_add_paymentFunction · 0.70
jsonrpc_stream_successFunction · 0.50
command_finishedFunction · 0.50
command_failFunction · 0.50

Tested by

no test coverage detected