Browse Source

masterd: Disable a channel when channeld fails

Signed-off-by: Christian Decker <decker.christian@gmail.com>
ppa-0.6.1
Christian Decker 7 years ago
committed by Rusty Russell
parent
commit
e463386d75
  1. 6
      lightningd/peer_control.c

6
lightningd/peer_control.c

@ -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…
Cancel
Save