From 243174228559fc66268f3e8d6f5a684f37d77757 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 31 May 2018 12:01:27 +0930 Subject: [PATCH] gossipd: don't publish private updates after channel_announce. We generate new ones anyway; removing this code changes fixes coming up which now only need to change one place. Signed-off-by: Rusty Russell --- gossipd/routing.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/gossipd/routing.c b/gossipd/routing.c index 23dcb1fe4e23..f86344c74c53 100644 --- a/gossipd/routing.c +++ b/gossipd/routing.c @@ -638,13 +638,10 @@ bool routing_add_channel_announcement(struct routing_state *rstate, /* Now we can broadcast channel announce */ insert_broadcast(rstate->broadcasts, chan->channel_announce); - /* If we had private updates for channels, we can broadcast them too. */ - for (size_t i = 0; i < ARRAY_SIZE(chan->half); i++) { - if (!is_halfchan_defined(&chan->half[i])) - continue; - insert_broadcast(rstate->broadcasts, - chan->half[i].channel_update); - } + /* Clear any private updates. */ + for (size_t i = 0; i < ARRAY_SIZE(chan->half); i++) + chan->half[i].channel_update + = tal_free(chan->half[i].channel_update); return true; }