diff --git a/gossipd/gossip.c b/gossipd/gossip.c index ec62d15ec..5bb964433 100644 --- a/gossipd/gossip.c +++ b/gossipd/gossip.c @@ -1769,6 +1769,12 @@ static struct io_plan *handle_txout_reply(struct io_conn *conn, return daemon_conn_read_next(conn, &daemon->master); } +static struct io_plan *handle_disable_channel(struct io_conn *conn, + struct daemon *daemon, u8 *msg) +{ + return daemon_conn_read_next(conn, &daemon->master); +} + static struct io_plan *recv_req(struct io_conn *conn, struct daemon_conn *master) { struct daemon *daemon = container_of(master, struct daemon, master); @@ -1814,6 +1820,9 @@ static struct io_plan *recv_req(struct io_conn *conn, struct daemon_conn *master case WIRE_GOSSIP_GET_TXOUT_REPLY: return handle_txout_reply(conn, daemon, master->msg_in); + case WIRE_GOSSIP_DISABLE_CHANNEL: + return handle_disable_channel(conn, daemon, master->msg_in); + /* We send these, we don't receive them */ case WIRE_GOSSIPCTL_RELEASE_PEER_REPLY: case WIRE_GOSSIPCTL_RELEASE_PEER_REPLYFAIL: diff --git a/gossipd/gossip_wire.csv b/gossipd/gossip_wire.csv index 85ffa49d6..29b98cb83 100644 --- a/gossipd/gossip_wire.csv +++ b/gossipd/gossip_wire.csv @@ -183,3 +183,8 @@ gossip_get_txout_reply,,short_channel_id,struct short_channel_id gossip_get_txout_reply,,len,u16 gossip_get_txout_reply,,outscript,len*u8 +# client->gossipd: Disable the channel matching the short_channel_id +gossip_disable_channel,3019 +gossip_disable_channel,,short_channel_id,struct short_channel_id +gossip_disable_channel,,direction,u8 +gossip_disable_channel,,active,bool diff --git a/lightningd/gossip_control.c b/lightningd/gossip_control.c index 5712dc929..9792cf193 100644 --- a/lightningd/gossip_control.c +++ b/lightningd/gossip_control.c @@ -109,6 +109,7 @@ static unsigned gossip_msg(struct subd *gossip, const u8 *msg, const int *fds) case WIRE_GOSSIP_GET_UPDATE: case WIRE_GOSSIP_SEND_GOSSIP: case WIRE_GOSSIP_GET_TXOUT_REPLY: + case WIRE_GOSSIP_DISABLE_CHANNEL: /* This is a reply, so never gets through to here. */ case WIRE_GOSSIP_GET_UPDATE_REPLY: case WIRE_GOSSIP_GETNODES_REPLY: