diff --git a/gossipd/gossip_store.c b/gossipd/gossip_store.c index ed33de947..bf1c01d0e 100644 --- a/gossipd/gossip_store.c +++ b/gossipd/gossip_store.c @@ -963,10 +963,6 @@ u32 gossip_store_load(struct routing_state *rstate, struct gossip_store *gs) } stats[2]++; break; - /* FIXME: Don't actually put these in! */ - case WIRE_GOSSIP_STORE_PRIVATE_CHANNEL_OBS: - case WIRE_GOSSIP_STORE_PRIVATE_UPDATE_OBS: - break; default: bad = "Unknown message"; goto badmsg; diff --git a/gossipd/gossipd.c b/gossipd/gossipd.c index 35015ec49..49d75a4fd 100644 --- a/gossipd/gossipd.c +++ b/gossipd/gossipd.c @@ -331,47 +331,6 @@ static void handle_local_channel_announcement(struct daemon *daemon, const u8 *m } -/* channeld (via lightningd) tells us about (as-yet?) unannounce channel. - * It needs us to put it in gossip_store. */ -static void handle_local_private_channel(struct daemon *daemon, const u8 *msg) -{ - struct node_id id; - struct amount_sat capacity; - u8 *features; - struct short_channel_id scid; - const u8 *cannounce; - struct chan *zombie; - - if (!fromwire_gossipd_local_private_channel(msg, msg, - &id, &capacity, &scid, - &features)) - master_badmsg(WIRE_GOSSIPD_LOCAL_PRIVATE_CHANNEL, msg); - - status_debug("received private channel announcement from channeld for %s", - type_to_string(tmpctx, struct short_channel_id, &scid)); - cannounce = private_channel_announcement(tmpctx, - &scid, - &daemon->id, - &id, - features); - /* If there is already a zombie announcement for this channel in the - * store we can disregard this one. */ - zombie = get_channel(daemon->rstate, &scid); - if (zombie && (zombie->half[0].zombie || zombie->half[1].zombie)){ - status_debug("received channel announcement for %s," - " but it is a zombie; discarding", - type_to_string(tmpctx, struct short_channel_id, - &scid)); - return; - } - - if (!routing_add_private_channel(daemon->rstate, &id, capacity, - cannounce, 0)) { - status_peer_broken(&id, "bad add_private_channel %s", - tal_hex(tmpctx, cannounce)); - } -} - /* lightningd tells us it has discovered and verified new `remote_addr`. * We can use this to update our node announcement. */ static void handle_discovered_ip(struct daemon *daemon, const u8 *msg) @@ -1164,10 +1123,6 @@ static struct io_plan *recv_req(struct io_conn *conn, handle_local_channel_announcement(daemon, msg); goto done; - case WIRE_GOSSIPD_LOCAL_PRIVATE_CHANNEL: - handle_local_private_channel(daemon, msg); - goto done; - case WIRE_GOSSIPD_DISCOVERED_IP: handle_discovered_ip(daemon, msg); goto done; diff --git a/gossipd/gossipd_wire.csv b/gossipd/gossipd_wire.csv index 0dd73b669..7a72606cb 100644 --- a/gossipd/gossipd_wire.csv +++ b/gossipd/gossipd_wire.csv @@ -120,15 +120,6 @@ msgdata,gossipd_local_channel_announcement,id,node_id, msgdata,gossipd_local_channel_announcement,len,u16, msgdata,gossipd_local_channel_announcement,cannounce,u8,len -# Tell gossipd about a private channel (to put it in the store) -# cannounce has same structure, dummy sigs. -msgtype,gossipd_local_private_channel,3008 -msgdata,gossipd_local_private_channel,id,node_id, -msgdata,gossipd_local_private_channel,capacity,amount_sat, -msgdata,gossipd_local_private_channel,scid,short_channel_id, -msgdata,gossipd_local_private_channel,len,u16, -msgdata,gossipd_local_private_channel,features,u8,len - # Tell gossipd we used the channel update (in case it was deferred) msgtype,gossipd_used_local_channel_update,3052 msgdata,gossipd_used_local_channel_update,scid,short_channel_id, diff --git a/lightningd/gossip_control.c b/lightningd/gossip_control.c index e73bdc9d4..36933141e 100644 --- a/lightningd/gossip_control.c +++ b/lightningd/gossip_control.c @@ -171,7 +171,6 @@ static unsigned gossip_msg(struct subd *gossip, const u8 *msg, const int *fds) case WIRE_GOSSIPD_LOCAL_CHANNEL_ANNOUNCEMENT: case WIRE_GOSSIPD_USED_LOCAL_CHANNEL_UPDATE: case WIRE_GOSSIPD_LOCAL_CHANNEL_UPDATE: - case WIRE_GOSSIPD_LOCAL_PRIVATE_CHANNEL: /* This is a reply, so never gets through to here. */ case WIRE_GOSSIPD_INIT_REPLY: case WIRE_GOSSIPD_DEV_MEMLEAK_REPLY: