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

Function payment_finish

plugins/renepay/payment.c:304–319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302}
303
304static struct command_result *payment_finish(struct payment *p)
305{
306 assert(p->status == PAYMENT_FAIL || p->status == PAYMENT_SUCCESS);
307 assert(!payment_commands_empty(p));
308 struct command *cmd = p->cmd_array[0];
309
310 // notify all commands that the payment completed
311 for (size_t i = 1; i < tal_count(p->cmd_array); ++i) {
312 my_command_finish(p, p->cmd_array[i]);
313 }
314
315 // set the payment into a valid final state
316 payment_cleanup(p);
317
318 return my_command_finish(p, cmd);
319}
320
321void payment_disable_chan(struct payment *p, struct short_channel_id_dir scidd,
322 enum log_level lvl, const char *fmt, ...)

Callers 2

payment_successFunction · 0.85
payment_failFunction · 0.85

Calls 3

payment_commands_emptyFunction · 0.85
my_command_finishFunction · 0.85
payment_cleanupFunction · 0.85

Tested by

no test coverage detected