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

Function payment_failure_notify_core

plugins/libplugin-pay.c:2103–2115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2101}
2102
2103static void payment_failure_notify_core(struct payment *p,
2104 struct json_stream *n,
2105 const char *error_message)
2106{
2107 struct payment *root = payment_root(p);
2108 json_add_sha256(n, "payment_hash", p->payment_hash);
2109 if (root->invstring != NULL)
2110 json_add_string(n, "bolt11", root->invstring);
2111
2112 json_object_start(n, "error");
2113 json_add_string(n, "message", error_message);
2114 json_object_end(n); /* .error */
2115}
2116
2117static void payment_notify_failure(struct payment *p, const char *error_message)
2118{

Callers 1

payment_notify_failureFunction · 0.85

Calls 5

payment_rootFunction · 0.85
json_add_sha256Function · 0.85
json_object_startFunction · 0.85
json_object_endFunction · 0.85
json_add_stringFunction · 0.50

Tested by

no test coverage detected