gossipd: don't include channel in query_short_channel_ids reply if no channel_update.

This is consistent: we don't broadcast a channel_announce until we've seen
a channel_update, so we probably shouldn't advertise it here.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2018-09-28 09:15:37 +09:30 committed by Christian Decker
parent 9455331575
commit fbb7bafc3b

View file

@ -809,7 +809,7 @@ static bool create_next_scid_reply(struct peer *peer)
struct chan *chan;
chan = get_channel(rstate, &peer->scid_queries[i]);
if (!chan || !is_chan_public(chan))
if (!chan || !is_chan_announced(chan))
continue;
queue_peer_msg(peer, chan->channel_announce);
@ -841,7 +841,7 @@ static bool create_next_scid_reply(struct peer *peer)
const struct node *n;
n = get_node(rstate, &peer->scid_query_nodes[i]);
if (!n || !n->node_announcement || !n->node_announcement_index)
if (!n || !n->node_announcement_index)
continue;
queue_peer_msg(peer, n->node_announcement);