mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
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 <decker.christian@gmail.com>
This commit is contained in:
parent
8aee38162c
commit
6320142c34
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user