mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
gossip: Add message to enable and disable a channel
Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
d14969ce77
commit
c6ae4b521f
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user