Browse Source

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>
fee-tracking2
Rusty Russell 6 years ago
committed by Christian Decker
parent
commit
fbb7bafc3b
  1. 4
      gossipd/gossipd.c

4
gossipd/gossipd.c

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

Loading…
Cancel
Save