channel: Disable channels that are lost via a channel_update

Before exiting, `channeld` constructs and sends a `channel_update`
marking the channel as disabled. This is the pro-active signalling
that the channel may no longer be used.
This commit is contained in:
Christian Decker
2017-03-21 21:21:17 +01:00
committed by Rusty Russell
parent c8da420a9d
commit 60a2227f0d
3 changed files with 44 additions and 25 deletions

View File

@@ -750,7 +750,7 @@ void handle_channel_update(struct routing_state *rstate, const u8 *update, size_
c->htlc_minimum_msat = htlc_minimum_msat;
c->base_fee = fee_base_msat;
c->proportional_fee = fee_proportional_millionths;
c->active = true;
c->active = (flags & ROUTING_FLAGS_DISABLED) == 0;
log_debug(rstate->base_log, "Channel %d:%d:%d(%d) was updated.",
short_channel_id.blocknum,
short_channel_id.txnum,