gossipd: suppress redundant local updates which we would generate.

This doesn't do anything for us now, since we actually tend to produce
DISABLE/ENABLE update pairs.  But the infrastructure is useful for the
next patch.

We also add more details to the trace message in the core update code.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-07-03 06:24:12 +09:30
committed by Christian Decker
parent 2d533dc82e
commit ef59a8f4aa
2 changed files with 38 additions and 1 deletions

View File

@@ -1207,11 +1207,14 @@ u8 *handle_channel_update(struct routing_state *rstate, const u8 *update,
return err;
}
status_trace("Received channel_update for channel %s(%d) now %s (from %s)",
status_trace("Received channel_update for channel %s(%d) now %s was %s (from %s)",
type_to_string(tmpctx, struct short_channel_id,
&short_channel_id),
flags & 0x01,
flags & ROUTING_FLAGS_DISABLED ? "DISABLED" : "ACTIVE",
is_halfchan_defined(c)
? (c->flags & ROUTING_FLAGS_DISABLED ? "DISABLED" : "ACTIVE")
: "UNDEFINED",
source);
if (!routing_add_channel_update(rstate, serialized))