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

Function pay_done

plugins/offers_inv_hook.c:129–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129static struct command_result *pay_done(struct command *cmd,
130 const char *buf,
131 const jsmntok_t *result,
132 struct inv *inv)
133{
134 struct amount_msat msat = amount_msat(*inv->inv->amount);
135
136 plugin_log(cmd->plugin, LOG_INFORM,
137 "Payed out %s for offer %s%s: %.*s",
138 type_to_string(tmpctx, struct amount_msat, &msat),
139 type_to_string(tmpctx, struct sha256, inv->inv->offer_id),
140 inv->offer->refund_for ? " (refund)": "",
141 json_tok_full_len(result),
142 json_tok_full(buf, result));
143 return command_hook_success(cmd);
144}
145
146static struct command_result *pay_error(struct command *cmd,
147 const char *buf,

Callers

nothing calls this directly

Calls 6

command_hook_successFunction · 0.85
amount_msatClass · 0.70
plugin_logFunction · 0.70
type_to_stringClass · 0.50
json_tok_full_lenFunction · 0.50
json_tok_fullFunction · 0.50

Tested by

no test coverage detected