mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
channeld: Tell gossipd when we get a shutdown message from a peer
Disabling the channel and enqueing the update for broadcast so we don't get forwarding requests from remote peers, and we don't try to ourselves. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
parent
6320142c34
commit
4f4b0e9bba
@ -1528,7 +1528,10 @@ static void handle_pong(struct peer *peer, const u8 *pong)
|
||||
static void handle_peer_shutdown(struct peer *peer, const u8 *shutdown)
|
||||
{
|
||||
struct channel_id channel_id;
|
||||
u8 *scriptpubkey;
|
||||
u8 *scriptpubkey, *msg;
|
||||
|
||||
msg = create_channel_update(peer, peer, true);
|
||||
wire_sync_write(GOSSIP_FD, take(msg));
|
||||
|
||||
if (!fromwire_shutdown(peer, shutdown, NULL, &channel_id, &scriptpubkey))
|
||||
peer_failed(PEER_FD,
|
||||
|
Loading…
Reference in New Issue
Block a user