Skip to content

Commit

Permalink
gossipd: don't publish private updates after channel_announce.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
rustyrussell committed Jun 6, 2018
1 parent 27a186b commit 2431742
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions gossipd/routing.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2431742

Please sign in to comment.