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

Function pay_done

plugins/offers_inv_hook.c:94–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94static struct command_result *pay_done(struct command *cmd,
95 const char *method,
96 const char *buf,
97 const jsmntok_t *result,
98 struct inv *inv)
99{
100 struct amount_msat msat = amount_msat(*inv->inv->invoice_amount);
101
102 plugin_log(cmd->plugin, LOG_INFORM,
103 "Payed out %s for invreq %s: %.*s",
104 fmt_amount_msat(tmpctx, msat),
105 fmt_sha256(tmpctx, &inv->invreq_id),
106 json_tok_full_len(result),
107 json_tok_full(buf, result));
108 return command_hook_success(cmd);
109}
110
111static struct command_result *pay_error(struct command *cmd,
112 const char *method,

Callers

nothing calls this directly

Calls 7

fmt_sha256Function · 0.85
amount_msatClass · 0.70
plugin_logFunction · 0.70
command_hook_successFunction · 0.70
fmt_amount_msatFunction · 0.50
json_tok_full_lenFunction · 0.50
json_tok_fullFunction · 0.50

Tested by

no test coverage detected