mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
masterd: Disable a channel when channeld fails
Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
007c349dec
commit
e463386d75
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user