mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-21 16:14:23 +01:00
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:
committed by
Christian Decker
parent
9455331575
commit
fbb7bafc3b
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user