mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 14:42:40 +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
1 changed files with 6 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue