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

Function param_raw_invreq

plugins/fetchinvoice.c:1659–1676  ·  view source on GitHub ↗

This version doesn't do sanity checks! */

Source from the content-addressed store, hash-verified

1657
1658/* This version doesn't do sanity checks! */
1659static struct command_result *param_raw_invreq(struct command *cmd,
1660 const char *name,
1661 const char *buffer,
1662 const jsmntok_t *tok,
1663 struct tlv_invoice_request **invreq)
1664{
1665 const char *fail;
1666
1667 *invreq = invrequest_decode(cmd, buffer + tok->start, tok->end - tok->start,
1668 plugin_feature_set(cmd->plugin), chainparams,
1669 &fail);
1670 if (!*invreq)
1671 return command_fail_badparam(cmd, name, buffer, tok,
1672 tal_fmt(cmd,
1673 "Unparsable invreq: %s",
1674 fail));
1675 return NULL;
1676}
1677
1678struct command_result *json_dev_rawrequest(struct command *cmd,
1679 const char *buffer,

Callers

nothing calls this directly

Calls 3

invrequest_decodeFunction · 0.85
plugin_feature_setFunction · 0.70
command_fail_badparamFunction · 0.50

Tested by

no test coverage detected