mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 14:42:40 +01:00
masterd: Disable a channel when channeld fails
Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
parent
007c349dec
commit
e463386d75
1 changed files with 6 additions and 0 deletions
|
@ -186,11 +186,17 @@ void peer_fail_permanent(struct peer *peer, const char *fmt, ...)
|
|||
{
|
||||
va_list ap;
|
||||
char *why;
|
||||
u8 *msg;
|
||||
|
||||
va_start(ap, fmt);
|
||||
why = tal_vfmt(peer, fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
if (peer->scid) {
|
||||
msg = towire_gossip_disable_channel(peer, peer->scid, peer->direction, false);
|
||||
subd_send_msg(peer->ld->gossip, take(msg));
|
||||
}
|
||||
|
||||
log_unusual(peer->log, "Peer permanent failure in %s: %s",
|
||||
peer_state_name(peer->state), why);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue