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:
Rusty Russell
2022-10-17 11:14:39 +10:30
parent 67b8fadf02
commit 5cf86a1a2e
24 changed files with 196 additions and 229 deletions

View File

@@ -13,7 +13,7 @@ struct inv {
struct tlv_invoice *inv;
/* May be NULL */
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;
@@ -26,7 +26,7 @@ fail_inv_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");
@@ -56,7 +56,7 @@ fail_inv_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, inv->reply_path, payload);
@@ -319,7 +319,7 @@ static struct command_result *listoffers_error(struct command *cmd,
struct command_result *handle_invoice(struct command *cmd,
const u8 *invbin,
struct tlv_onionmsg_payload_reply_path *reply_path STEALS)
struct blinded_path *reply_path STEALS)
{
size_t len = tal_count(invbin);
struct inv *inv = tal(cmd, struct inv);