gossipd: add flag for locally disabling channel.

We used to just manually set ROUTING_FLAGS_DISABLED, but that means we
then suppressed the real channel_update because we thought it was a
duplicate!

So use a local flag: set it for the channel when the peer disconnects,
and clear it when channeld sends a local update.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-07-27 06:51:37 +09:30
committed by Christian Decker
parent 93cf28553d
commit 3c66d5fa03
6 changed files with 21 additions and 9 deletions

View File

@@ -55,6 +55,9 @@ struct chan {
/* Index in broadcast map, if public (otherwise 0) */
u64 channel_announcement_index;
/* Disabled locally (due to peer disconnect) */
bool local_disabled;
u64 satoshis;
};