mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 16:44:20 +01:00
common: update to latest onion message spec.
Mainly, field name changes. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-EXPERIMENTAL: Protocol: Support for forwarding blinded payments (as per latest draft)
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
/* We need to keep the reply path around so we can reply with invoice */
|
||||
struct invreq {
|
||||
struct tlv_invoice_request *invreq;
|
||||
struct tlv_onionmsg_payload_reply_path *reply_path;
|
||||
struct blinded_path *reply_path;
|
||||
|
||||
/* The offer, once we've looked it up. */
|
||||
struct tlv_offer *offer;
|
||||
@@ -35,7 +35,7 @@ fail_invreq_level(struct command *cmd,
|
||||
const char *fmt, va_list ap)
|
||||
{
|
||||
char *full_fmt, *msg;
|
||||
struct tlv_onionmsg_payload *payload;
|
||||
struct tlv_onionmsg_tlv *payload;
|
||||
struct tlv_invoice_error *err;
|
||||
|
||||
full_fmt = tal_fmt(tmpctx, "Failed invoice_request");
|
||||
@@ -61,7 +61,7 @@ fail_invreq_level(struct command *cmd,
|
||||
err->error = tal_dup_arr(err, char, msg, strlen(msg), 0);
|
||||
/* FIXME: Add suggested_value / erroneous_field! */
|
||||
|
||||
payload = tlv_onionmsg_payload_new(tmpctx);
|
||||
payload = tlv_onionmsg_tlv_new(tmpctx);
|
||||
payload->invoice_error = tal_arr(payload, u8, 0);
|
||||
towire_tlv_invoice_error(&payload->invoice_error, err);
|
||||
return send_onion_reply(cmd, invreq->reply_path, payload);
|
||||
@@ -170,7 +170,7 @@ static struct command_result *createinvoice_done(struct command *cmd,
|
||||
{
|
||||
char *hrp;
|
||||
u8 *rawinv;
|
||||
struct tlv_onionmsg_payload *payload;
|
||||
struct tlv_onionmsg_tlv *payload;
|
||||
const jsmntok_t *t;
|
||||
|
||||
/* We have a signed invoice, use it as a reply. */
|
||||
@@ -183,7 +183,7 @@ static struct command_result *createinvoice_done(struct command *cmd,
|
||||
json_tok_full(buf, t));
|
||||
}
|
||||
|
||||
payload = tlv_onionmsg_payload_new(tmpctx);
|
||||
payload = tlv_onionmsg_tlv_new(tmpctx);
|
||||
payload->invoice = rawinv;
|
||||
return send_onion_reply(cmd, ir->reply_path, payload);
|
||||
}
|
||||
@@ -831,7 +831,7 @@ static struct command_result *handle_offerless_request(struct command *cmd,
|
||||
|
||||
struct command_result *handle_invoice_request(struct command *cmd,
|
||||
const u8 *invreqbin,
|
||||
struct tlv_onionmsg_payload_reply_path *reply_path)
|
||||
struct blinded_path *reply_path)
|
||||
{
|
||||
size_t len = tal_count(invreqbin);
|
||||
struct invreq *ir = tal(cmd, struct invreq);
|
||||
|
||||
Reference in New Issue
Block a user