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

Function payment_failure_notify_core

plugins/libplugin-pay.c:2119–2131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2117}
2118
2119static void payment_failure_notify_core(struct payment *p,
2120 struct json_stream *n,
2121 const char *error_message)
2122{
2123 struct payment *root = payment_root(p);
2124 json_add_sha256(n, "payment_hash", p->payment_hash);
2125 if (root->invstring != NULL)
2126 json_add_string(n, "bolt11", root->invstring);
2127
2128 json_object_start(n, "error");
2129 json_add_string(n, "message", error_message);
2130 json_object_end(n); /* .error */
2131}
2132
2133static void payment_notify_failure(struct payment *p, const char *error_message)
2134{

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