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

Function injectonion_succeed

lightningd/pay.c:1741–1755  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1739}
1740
1741static struct command_result *
1742injectonion_succeed(struct command *cmd,
1743 const struct wallet_payment *payment,
1744 void *unused)
1745{
1746 struct json_stream *response = json_stream_success(cmd);
1747
1748 assert(payment->status == PAYMENT_COMPLETE);
1749
1750 json_add_u64(response, "created_index", payment->id);
1751 json_add_u32(response, "created_at", payment->timestamp);
1752 json_add_u32(response, "completed_at", *payment->completed_at);
1753 json_add_preimage(response, "payment_preimage", payment->payment_preimage);
1754 return command_success(cmd, response);
1755}
1756
1757struct selfpay {
1758 struct command *cmd;

Callers

nothing calls this directly

Calls 5

json_add_u64Function · 0.85
json_add_u32Function · 0.85
json_add_preimageFunction · 0.85
json_stream_successFunction · 0.70
command_successFunction · 0.70

Tested by

no test coverage detected