diff --git a/gossipd/gossipd.c b/gossipd/gossipd.c index 900eebbeb..71f6d5289 100644 --- a/gossipd/gossipd.c +++ b/gossipd/gossipd.c @@ -567,7 +567,7 @@ static u8 *handle_obs_onion_message(struct peer *peer, const u8 *msg) omsg = tal_arr(tmpctx, u8, 0); towire_tlvstream_raw(&omsg, om->fields); daemon_conn_send(peer->daemon->master, - take(towire_gossipd_got_onionmsg_to_us(NULL, + take(towire_gossipd_got_obs_onionmsg_to_us(NULL, blinding_in, blinding, path, @@ -600,7 +600,7 @@ static u8 *handle_obs_onion_message(struct peer *peer, const u8 *msg) next_node = NULL; daemon_conn_send(peer->daemon->master, - take(towire_gossipd_got_onionmsg_forward(NULL, + take(towire_gossipd_got_obs_onionmsg_forward(NULL, om->obs_next_short_channel_id, next_node, next_blinding, @@ -609,8 +609,8 @@ static u8 *handle_obs_onion_message(struct peer *peer, const u8 *msg) return NULL; } -/* We send onion msg. */ -static struct io_plan *onionmsg_req(struct io_conn *conn, struct daemon *daemon, +/* We send an obsolete onion msg. */ +static struct io_plan *obs_onionmsg_req(struct io_conn *conn, struct daemon *daemon, const u8 *msg) { struct node_id id; @@ -618,9 +618,9 @@ static struct io_plan *onionmsg_req(struct io_conn *conn, struct daemon *daemon, struct pubkey *blinding; struct peer *peer; - if (!fromwire_gossipd_send_onionmsg(msg, msg, &id, &onion_routing_packet, + if (!fromwire_gossipd_send_obs_onionmsg(msg, msg, &id, &onion_routing_packet, &blinding)) - master_badmsg(WIRE_GOSSIPD_SEND_ONIONMSG, msg); + master_badmsg(WIRE_GOSSIPD_SEND_OBS_ONIONMSG, msg); /* Even if lightningd were to check for valid ids, there's a race * where it might vanish before we read this command; cleaner to @@ -1507,8 +1507,8 @@ static struct io_plan *recv_req(struct io_conn *conn, break; #endif /* !DEVELOPER */ - case WIRE_GOSSIPD_SEND_ONIONMSG: - return onionmsg_req(conn, daemon, msg); + case WIRE_GOSSIPD_SEND_OBS_ONIONMSG: + return obs_onionmsg_req(conn, daemon, msg); /* We send these, we don't receive them */ case WIRE_GOSSIPD_PING_REPLY: case WIRE_GOSSIPD_INIT_REPLY: @@ -1516,8 +1516,8 @@ static struct io_plan *recv_req(struct io_conn *conn, case WIRE_GOSSIPD_GET_TXOUT: case WIRE_GOSSIPD_DEV_MEMLEAK_REPLY: case WIRE_GOSSIPD_DEV_COMPACT_STORE_REPLY: - case WIRE_GOSSIPD_GOT_ONIONMSG_TO_US: - case WIRE_GOSSIPD_GOT_ONIONMSG_FORWARD: + case WIRE_GOSSIPD_GOT_OBS_ONIONMSG_TO_US: + case WIRE_GOSSIPD_GOT_OBS_ONIONMSG_FORWARD: case WIRE_GOSSIPD_ADDGOSSIP_REPLY: break; } diff --git a/gossipd/gossipd_wire.csv b/gossipd/gossipd_wire.csv index 1f41189a5..c426f0341 100644 --- a/gossipd/gossipd_wire.csv +++ b/gossipd/gossipd_wire.csv @@ -87,28 +87,28 @@ msgdata,gossipd_dev_compact_store_reply,success,bool, msgtype,gossipd_new_blockheight,3026 msgdata,gossipd_new_blockheight,blockheight,u32, -# Tell lightningd we got a onion message (for us, or to fwd) -msgtype,gossipd_got_onionmsg_to_us,3142 -msgdata,gossipd_got_onionmsg_to_us,blinding_in,?pubkey, -msgdata,gossipd_got_onionmsg_to_us,reply_blinding,?pubkey, -msgdata,gossipd_got_onionmsg_to_us,reply_path_len,u16, -msgdata,gossipd_got_onionmsg_to_us,reply_path,onionmsg_path,reply_path_len -msgdata,gossipd_got_onionmsg_to_us,rawmsg_len,u16, -msgdata,gossipd_got_onionmsg_to_us,rawmsg,u8,rawmsg_len +# Tell lightningd we got an obsolete onion message (for us, or to fwd) +msgtype,gossipd_got_obs_onionmsg_to_us,3142 +msgdata,gossipd_got_obs_onionmsg_to_us,blinding_in,?pubkey, +msgdata,gossipd_got_obs_onionmsg_to_us,reply_blinding,?pubkey, +msgdata,gossipd_got_obs_onionmsg_to_us,reply_path_len,u16, +msgdata,gossipd_got_obs_onionmsg_to_us,reply_path,onionmsg_path,reply_path_len +msgdata,gossipd_got_obs_onionmsg_to_us,rawmsg_len,u16, +msgdata,gossipd_got_obs_onionmsg_to_us,rawmsg,u8,rawmsg_len -msgtype,gossipd_got_onionmsg_forward,3143 -msgdata,gossipd_got_onionmsg_forward,next_scid,?short_channel_id, -msgdata,gossipd_got_onionmsg_forward,next_node_id,?node_id, -msgdata,gossipd_got_onionmsg_forward,next_blinding,?pubkey, -msgdata,gossipd_got_onionmsg_forward,next_onion_len,u16, -msgdata,gossipd_got_onionmsg_forward,next_onion,u8,next_onion_len +msgtype,gossipd_got_obs_onionmsg_forward,3143 +msgdata,gossipd_got_obs_onionmsg_forward,next_scid,?short_channel_id, +msgdata,gossipd_got_obs_onionmsg_forward,next_node_id,?node_id, +msgdata,gossipd_got_obs_onionmsg_forward,next_blinding,?pubkey, +msgdata,gossipd_got_obs_onionmsg_forward,next_onion_len,u16, +msgdata,gossipd_got_obs_onionmsg_forward,next_onion,u8,next_onion_len # Lightningd tells us to send a onion message. -msgtype,gossipd_send_onionmsg,3040 -msgdata,gossipd_send_onionmsg,id,node_id, -msgdata,gossipd_send_onionmsg,onion_len,u16, -msgdata,gossipd_send_onionmsg,onion,u8,onion_len -msgdata,gossipd_send_onionmsg,blinding,?pubkey, +msgtype,gossipd_send_obs_onionmsg,3040 +msgdata,gossipd_send_obs_onionmsg,id,node_id, +msgdata,gossipd_send_obs_onionmsg,onion_len,u16, +msgdata,gossipd_send_obs_onionmsg,onion,u8,onion_len +msgdata,gossipd_send_obs_onionmsg,blinding,?pubkey, # Lightningd tells us to inject a gossip message (for addgossip RPC) msgtype,gossipd_addgossip,3044 diff --git a/gossipd/gossipd_wiregen.c b/gossipd/gossipd_wiregen.c index d0bf90cf9..78f00781b 100644 --- a/gossipd/gossipd_wiregen.c +++ b/gossipd/gossipd_wiregen.c @@ -38,9 +38,9 @@ const char *gossipd_wire_name(int e) case WIRE_GOSSIPD_DEV_COMPACT_STORE: return "WIRE_GOSSIPD_DEV_COMPACT_STORE"; case WIRE_GOSSIPD_DEV_COMPACT_STORE_REPLY: return "WIRE_GOSSIPD_DEV_COMPACT_STORE_REPLY"; case WIRE_GOSSIPD_NEW_BLOCKHEIGHT: return "WIRE_GOSSIPD_NEW_BLOCKHEIGHT"; - case WIRE_GOSSIPD_GOT_ONIONMSG_TO_US: return "WIRE_GOSSIPD_GOT_ONIONMSG_TO_US"; - case WIRE_GOSSIPD_GOT_ONIONMSG_FORWARD: return "WIRE_GOSSIPD_GOT_ONIONMSG_FORWARD"; - case WIRE_GOSSIPD_SEND_ONIONMSG: return "WIRE_GOSSIPD_SEND_ONIONMSG"; + case WIRE_GOSSIPD_GOT_OBS_ONIONMSG_TO_US: return "WIRE_GOSSIPD_GOT_OBS_ONIONMSG_TO_US"; + case WIRE_GOSSIPD_GOT_OBS_ONIONMSG_FORWARD: return "WIRE_GOSSIPD_GOT_OBS_ONIONMSG_FORWARD"; + case WIRE_GOSSIPD_SEND_OBS_ONIONMSG: return "WIRE_GOSSIPD_SEND_OBS_ONIONMSG"; case WIRE_GOSSIPD_ADDGOSSIP: return "WIRE_GOSSIPD_ADDGOSSIP"; case WIRE_GOSSIPD_ADDGOSSIP_REPLY: return "WIRE_GOSSIPD_ADDGOSSIP_REPLY"; case WIRE_GOSSIPD_NEW_LEASE_RATES: return "WIRE_GOSSIPD_NEW_LEASE_RATES"; @@ -71,9 +71,9 @@ bool gossipd_wire_is_defined(u16 type) case WIRE_GOSSIPD_DEV_COMPACT_STORE:; case WIRE_GOSSIPD_DEV_COMPACT_STORE_REPLY:; case WIRE_GOSSIPD_NEW_BLOCKHEIGHT:; - case WIRE_GOSSIPD_GOT_ONIONMSG_TO_US:; - case WIRE_GOSSIPD_GOT_ONIONMSG_FORWARD:; - case WIRE_GOSSIPD_SEND_ONIONMSG:; + case WIRE_GOSSIPD_GOT_OBS_ONIONMSG_TO_US:; + case WIRE_GOSSIPD_GOT_OBS_ONIONMSG_FORWARD:; + case WIRE_GOSSIPD_SEND_OBS_ONIONMSG:; case WIRE_GOSSIPD_ADDGOSSIP:; case WIRE_GOSSIPD_ADDGOSSIP_REPLY:; case WIRE_GOSSIPD_NEW_LEASE_RATES:; @@ -535,15 +535,15 @@ bool fromwire_gossipd_new_blockheight(const void *p, u32 *blockheight) return cursor != NULL; } -/* WIRE: GOSSIPD_GOT_ONIONMSG_TO_US */ -/* Tell lightningd we got a onion message (for us */ -u8 *towire_gossipd_got_onionmsg_to_us(const tal_t *ctx, const struct pubkey *blinding_in, const struct pubkey *reply_blinding, const struct onionmsg_path **reply_path, const u8 *rawmsg) +/* WIRE: GOSSIPD_GOT_OBS_ONIONMSG_TO_US */ +/* Tell lightningd we got an obsolete onion message (for us */ +u8 *towire_gossipd_got_obs_onionmsg_to_us(const tal_t *ctx, const struct pubkey *blinding_in, const struct pubkey *reply_blinding, const struct onionmsg_path **reply_path, const u8 *rawmsg) { u16 reply_path_len = tal_count(reply_path); u16 rawmsg_len = tal_count(rawmsg); u8 *p = tal_arr(ctx, u8, 0); - towire_u16(&p, WIRE_GOSSIPD_GOT_ONIONMSG_TO_US); + towire_u16(&p, WIRE_GOSSIPD_GOT_OBS_ONIONMSG_TO_US); if (!blinding_in) towire_bool(&p, false); else { @@ -564,7 +564,7 @@ u8 *towire_gossipd_got_onionmsg_to_us(const tal_t *ctx, const struct pubkey *bli return memcheck(p, tal_count(p)); } -bool fromwire_gossipd_got_onionmsg_to_us(const tal_t *ctx, const void *p, struct pubkey **blinding_in, struct pubkey **reply_blinding, struct onionmsg_path ***reply_path, u8 **rawmsg) +bool fromwire_gossipd_got_obs_onionmsg_to_us(const tal_t *ctx, const void *p, struct pubkey **blinding_in, struct pubkey **reply_blinding, struct onionmsg_path ***reply_path, u8 **rawmsg) { u16 reply_path_len; u16 rawmsg_len; @@ -572,7 +572,7 @@ bool fromwire_gossipd_got_onionmsg_to_us(const tal_t *ctx, const void *p, struct const u8 *cursor = p; size_t plen = tal_count(p); - if (fromwire_u16(&cursor, &plen) != WIRE_GOSSIPD_GOT_ONIONMSG_TO_US) + if (fromwire_u16(&cursor, &plen) != WIRE_GOSSIPD_GOT_OBS_ONIONMSG_TO_US) return false; if (!fromwire_bool(&cursor, &plen)) *blinding_in = NULL; @@ -598,13 +598,13 @@ bool fromwire_gossipd_got_onionmsg_to_us(const tal_t *ctx, const void *p, struct return cursor != NULL; } -/* WIRE: GOSSIPD_GOT_ONIONMSG_FORWARD */ -u8 *towire_gossipd_got_onionmsg_forward(const tal_t *ctx, const struct short_channel_id *next_scid, const struct node_id *next_node_id, const struct pubkey *next_blinding, const u8 *next_onion) +/* WIRE: GOSSIPD_GOT_OBS_ONIONMSG_FORWARD */ +u8 *towire_gossipd_got_obs_onionmsg_forward(const tal_t *ctx, const struct short_channel_id *next_scid, const struct node_id *next_node_id, const struct pubkey *next_blinding, const u8 *next_onion) { u16 next_onion_len = tal_count(next_onion); u8 *p = tal_arr(ctx, u8, 0); - towire_u16(&p, WIRE_GOSSIPD_GOT_ONIONMSG_FORWARD); + towire_u16(&p, WIRE_GOSSIPD_GOT_OBS_ONIONMSG_FORWARD); if (!next_scid) towire_bool(&p, false); else { @@ -628,14 +628,14 @@ u8 *towire_gossipd_got_onionmsg_forward(const tal_t *ctx, const struct short_cha return memcheck(p, tal_count(p)); } -bool fromwire_gossipd_got_onionmsg_forward(const tal_t *ctx, const void *p, struct short_channel_id **next_scid, struct node_id **next_node_id, struct pubkey **next_blinding, u8 **next_onion) +bool fromwire_gossipd_got_obs_onionmsg_forward(const tal_t *ctx, const void *p, struct short_channel_id **next_scid, struct node_id **next_node_id, struct pubkey **next_blinding, u8 **next_onion) { u16 next_onion_len; const u8 *cursor = p; size_t plen = tal_count(p); - if (fromwire_u16(&cursor, &plen) != WIRE_GOSSIPD_GOT_ONIONMSG_FORWARD) + if (fromwire_u16(&cursor, &plen) != WIRE_GOSSIPD_GOT_OBS_ONIONMSG_FORWARD) return false; if (!fromwire_bool(&cursor, &plen)) *next_scid = NULL; @@ -662,14 +662,14 @@ bool fromwire_gossipd_got_onionmsg_forward(const tal_t *ctx, const void *p, stru return cursor != NULL; } -/* WIRE: GOSSIPD_SEND_ONIONMSG */ +/* WIRE: GOSSIPD_SEND_OBS_ONIONMSG */ /* Lightningd tells us to send a onion message. */ -u8 *towire_gossipd_send_onionmsg(const tal_t *ctx, const struct node_id *id, const u8 *onion, const struct pubkey *blinding) +u8 *towire_gossipd_send_obs_onionmsg(const tal_t *ctx, const struct node_id *id, const u8 *onion, const struct pubkey *blinding) { u16 onion_len = tal_count(onion); u8 *p = tal_arr(ctx, u8, 0); - towire_u16(&p, WIRE_GOSSIPD_SEND_ONIONMSG); + towire_u16(&p, WIRE_GOSSIPD_SEND_OBS_ONIONMSG); towire_node_id(&p, id); towire_u16(&p, onion_len); towire_u8_array(&p, onion, onion_len); @@ -682,14 +682,14 @@ u8 *towire_gossipd_send_onionmsg(const tal_t *ctx, const struct node_id *id, con return memcheck(p, tal_count(p)); } -bool fromwire_gossipd_send_onionmsg(const tal_t *ctx, const void *p, struct node_id *id, u8 **onion, struct pubkey **blinding) +bool fromwire_gossipd_send_obs_onionmsg(const tal_t *ctx, const void *p, struct node_id *id, u8 **onion, struct pubkey **blinding) { u16 onion_len; const u8 *cursor = p; size_t plen = tal_count(p); - if (fromwire_u16(&cursor, &plen) != WIRE_GOSSIPD_SEND_ONIONMSG) + if (fromwire_u16(&cursor, &plen) != WIRE_GOSSIPD_SEND_OBS_ONIONMSG) return false; fromwire_node_id(&cursor, &plen, id); onion_len = fromwire_u16(&cursor, &plen); @@ -777,4 +777,4 @@ bool fromwire_gossipd_new_lease_rates(const void *p, struct lease_rates *rates) fromwire_lease_rates(&cursor, &plen, rates); return cursor != NULL; } -// SHA256STAMP:ff8acca08dcaf1e1347cfd49c575c2df6ab9eb9c85a25b15ad7dbb6c181213b6 +// SHA256STAMP:d06e71483fdad04048e15d46b823420747d5f79efc97fa968752fa04b033d551 diff --git a/gossipd/gossipd_wiregen.h b/gossipd/gossipd_wiregen.h index 5db5e8686..1d8ae4a33 100644 --- a/gossipd/gossipd_wiregen.h +++ b/gossipd/gossipd_wiregen.h @@ -46,11 +46,11 @@ enum gossipd_wire { WIRE_GOSSIPD_DEV_COMPACT_STORE_REPLY = 3134, /* master -> gossipd: blockheight increased. */ WIRE_GOSSIPD_NEW_BLOCKHEIGHT = 3026, - /* Tell lightningd we got a onion message (for us */ - WIRE_GOSSIPD_GOT_ONIONMSG_TO_US = 3142, - WIRE_GOSSIPD_GOT_ONIONMSG_FORWARD = 3143, + /* Tell lightningd we got an obsolete onion message (for us */ + WIRE_GOSSIPD_GOT_OBS_ONIONMSG_TO_US = 3142, + WIRE_GOSSIPD_GOT_OBS_ONIONMSG_FORWARD = 3143, /* Lightningd tells us to send a onion message. */ - WIRE_GOSSIPD_SEND_ONIONMSG = 3040, + WIRE_GOSSIPD_SEND_OBS_ONIONMSG = 3040, /* Lightningd tells us to inject a gossip message (for addgossip RPC) */ WIRE_GOSSIPD_ADDGOSSIP = 3044, /* Empty string means no problem. */ @@ -157,19 +157,19 @@ bool fromwire_gossipd_dev_compact_store_reply(const void *p, bool *success); u8 *towire_gossipd_new_blockheight(const tal_t *ctx, u32 blockheight); bool fromwire_gossipd_new_blockheight(const void *p, u32 *blockheight); -/* WIRE: GOSSIPD_GOT_ONIONMSG_TO_US */ -/* Tell lightningd we got a onion message (for us */ -u8 *towire_gossipd_got_onionmsg_to_us(const tal_t *ctx, const struct pubkey *blinding_in, const struct pubkey *reply_blinding, const struct onionmsg_path **reply_path, const u8 *rawmsg); -bool fromwire_gossipd_got_onionmsg_to_us(const tal_t *ctx, const void *p, struct pubkey **blinding_in, struct pubkey **reply_blinding, struct onionmsg_path ***reply_path, u8 **rawmsg); +/* WIRE: GOSSIPD_GOT_OBS_ONIONMSG_TO_US */ +/* Tell lightningd we got an obsolete onion message (for us */ +u8 *towire_gossipd_got_obs_onionmsg_to_us(const tal_t *ctx, const struct pubkey *blinding_in, const struct pubkey *reply_blinding, const struct onionmsg_path **reply_path, const u8 *rawmsg); +bool fromwire_gossipd_got_obs_onionmsg_to_us(const tal_t *ctx, const void *p, struct pubkey **blinding_in, struct pubkey **reply_blinding, struct onionmsg_path ***reply_path, u8 **rawmsg); -/* WIRE: GOSSIPD_GOT_ONIONMSG_FORWARD */ -u8 *towire_gossipd_got_onionmsg_forward(const tal_t *ctx, const struct short_channel_id *next_scid, const struct node_id *next_node_id, const struct pubkey *next_blinding, const u8 *next_onion); -bool fromwire_gossipd_got_onionmsg_forward(const tal_t *ctx, const void *p, struct short_channel_id **next_scid, struct node_id **next_node_id, struct pubkey **next_blinding, u8 **next_onion); +/* WIRE: GOSSIPD_GOT_OBS_ONIONMSG_FORWARD */ +u8 *towire_gossipd_got_obs_onionmsg_forward(const tal_t *ctx, const struct short_channel_id *next_scid, const struct node_id *next_node_id, const struct pubkey *next_blinding, const u8 *next_onion); +bool fromwire_gossipd_got_obs_onionmsg_forward(const tal_t *ctx, const void *p, struct short_channel_id **next_scid, struct node_id **next_node_id, struct pubkey **next_blinding, u8 **next_onion); -/* WIRE: GOSSIPD_SEND_ONIONMSG */ +/* WIRE: GOSSIPD_SEND_OBS_ONIONMSG */ /* Lightningd tells us to send a onion message. */ -u8 *towire_gossipd_send_onionmsg(const tal_t *ctx, const struct node_id *id, const u8 *onion, const struct pubkey *blinding); -bool fromwire_gossipd_send_onionmsg(const tal_t *ctx, const void *p, struct node_id *id, u8 **onion, struct pubkey **blinding); +u8 *towire_gossipd_send_obs_onionmsg(const tal_t *ctx, const struct node_id *id, const u8 *onion, const struct pubkey *blinding); +bool fromwire_gossipd_send_obs_onionmsg(const tal_t *ctx, const void *p, struct node_id *id, u8 **onion, struct pubkey **blinding); /* WIRE: GOSSIPD_ADDGOSSIP */ /* Lightningd tells us to inject a gossip message (for addgossip RPC) */ @@ -188,4 +188,4 @@ bool fromwire_gossipd_new_lease_rates(const void *p, struct lease_rates *rates); #endif /* LIGHTNING_GOSSIPD_GOSSIPD_WIREGEN_H */ -// SHA256STAMP:ff8acca08dcaf1e1347cfd49c575c2df6ab9eb9c85a25b15ad7dbb6c181213b6 +// SHA256STAMP:d06e71483fdad04048e15d46b823420747d5f79efc97fa968752fa04b033d551 diff --git a/lightningd/gossip_control.c b/lightningd/gossip_control.c index a78fc722f..b9ac3346d 100644 --- a/lightningd/gossip_control.c +++ b/lightningd/gossip_control.c @@ -125,7 +125,7 @@ static unsigned gossip_msg(struct subd *gossip, const u8 *msg, const int *fds) case WIRE_GOSSIPD_DEV_COMPACT_STORE: case WIRE_GOSSIPD_DEV_SET_TIME: case WIRE_GOSSIPD_NEW_BLOCKHEIGHT: - case WIRE_GOSSIPD_SEND_ONIONMSG: + case WIRE_GOSSIPD_SEND_OBS_ONIONMSG: case WIRE_GOSSIPD_ADDGOSSIP: /* This is a reply, so never gets through to here. */ case WIRE_GOSSIPD_INIT_REPLY: @@ -135,11 +135,11 @@ static unsigned gossip_msg(struct subd *gossip, const u8 *msg, const int *fds) case WIRE_GOSSIPD_ADDGOSSIP_REPLY: break; - case WIRE_GOSSIPD_GOT_ONIONMSG_TO_US: - handle_onionmsg_to_us(gossip->ld, msg); + case WIRE_GOSSIPD_GOT_OBS_ONIONMSG_TO_US: + handle_obs_onionmsg_to_us(gossip->ld, msg); break; - case WIRE_GOSSIPD_GOT_ONIONMSG_FORWARD: - handle_onionmsg_forward(gossip->ld, msg); + case WIRE_GOSSIPD_GOT_OBS_ONIONMSG_FORWARD: + handle_obs_onionmsg_forward(gossip->ld, msg); break; case WIRE_GOSSIPD_PING_REPLY: ping_reply(gossip, msg); diff --git a/lightningd/onion_message.c b/lightningd/onion_message.c index 91eae6105..0e4fcc56d 100644 --- a/lightningd/onion_message.c +++ b/lightningd/onion_message.c @@ -89,7 +89,7 @@ REGISTER_PLUGIN_HOOK(onion_message_blinded, onion_message_serialize, struct onion_message_hook_payload *); -void handle_onionmsg_to_us(struct lightningd *ld, const u8 *msg) +void handle_obs_onionmsg_to_us(struct lightningd *ld, const u8 *msg) { struct onion_message_hook_payload *payload; u8 *submsg; @@ -99,11 +99,11 @@ void handle_onionmsg_to_us(struct lightningd *ld, const u8 *msg) payload = tal(ld, struct onion_message_hook_payload); payload->om = tlv_onionmsg_payload_new(payload); - if (!fromwire_gossipd_got_onionmsg_to_us(payload, msg, - &payload->blinding_in, - &payload->reply_blinding, - &payload->reply_path, - &submsg)) { + if (!fromwire_gossipd_got_obs_onionmsg_to_us(payload, msg, + &payload->blinding_in, + &payload->reply_blinding, + &payload->reply_path, + &submsg)) { log_broken(ld->log, "bad got_onionmsg_tous: %s", tal_hex(tmpctx, msg)); return; @@ -135,16 +135,16 @@ void handle_onionmsg_to_us(struct lightningd *ld, const u8 *msg) plugin_hook_call_onion_message(ld, payload); } -void handle_onionmsg_forward(struct lightningd *ld, const u8 *msg) +void handle_obs_onionmsg_forward(struct lightningd *ld, const u8 *msg) { struct short_channel_id *next_scid; struct node_id *next_node; struct pubkey *next_blinding; u8 *onion; - if (!fromwire_gossipd_got_onionmsg_forward(msg, msg, &next_scid, - &next_node, - &next_blinding, &onion)) { + if (!fromwire_gossipd_got_obs_onionmsg_forward(msg, msg, &next_scid, + &next_node, + &next_blinding, &onion)) { log_broken(ld->log, "bad got_onionmsg_forward: %s", tal_hex(tmpctx, msg)); return; @@ -164,10 +164,10 @@ void handle_onionmsg_forward(struct lightningd *ld, const u8 *msg) : "unspecified dest"); } else { subd_send_msg(ld->gossip, - take(towire_gossipd_send_onionmsg(NULL, - next_node, - onion, - next_blinding))); + take(towire_gossipd_send_obs_onionmsg(NULL, + next_node, + onion, + next_blinding))); } } @@ -440,7 +440,7 @@ static struct command_result *json_send_onion_message(struct command *cmd, "Creating onion failed (tlvs too long?)"); subd_send_msg(cmd->ld->gossip, - take(towire_gossipd_send_onionmsg(NULL, &first_id, + take(towire_gossipd_send_obs_onionmsg(NULL, &first_id, serialize_onionpacket(tmpctx, op), NULL))); diff --git a/lightningd/onion_message.h b/lightningd/onion_message.h index 748be5d93..722dc606c 100644 --- a/lightningd/onion_message.h +++ b/lightningd/onion_message.h @@ -5,7 +5,7 @@ struct lightningd; -void handle_onionmsg_to_us(struct lightningd *ld, const u8 *msg); -void handle_onionmsg_forward(struct lightningd *ld, const u8 *msg); +void handle_obs_onionmsg_to_us(struct lightningd *ld, const u8 *msg); +void handle_obs_onionmsg_forward(struct lightningd *ld, const u8 *msg); #endif /* LIGHTNING_LIGHTNINGD_ONION_MESSAGE_H */