From 6320142c340ba6014e8747734e2228890307ecf5 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Sun, 21 Jan 2018 12:01:18 +0100 Subject: [PATCH] channeld: Send disabling channel_update on shutdown Sends a disable channel_update before issuing the shutdown message, gossipd will also take care to update others and not use for future routes. Signed-off-by: Christian Decker --- channeld/channel.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/channeld/channel.c b/channeld/channel.c index a601c342d..a60f3f7b7 100644 --- a/channeld/channel.c +++ b/channeld/channel.c @@ -716,6 +716,12 @@ static void maybe_send_shutdown(struct peer *peer) if (!peer->unsent_shutdown_scriptpubkey) return; + /* Send a disable channel_update so others don't try to route + * over us */ + msg = create_channel_update(peer, peer, true); + wire_sync_write(GOSSIP_FD, msg); + enqueue_peer_msg(peer, take(msg)); + msg = towire_shutdown(peer, &peer->channel_id, peer->unsent_shutdown_scriptpubkey); enqueue_peer_msg(peer, take(msg));