gossipd: don't expose scids of unannounced channels.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2019-09-27 09:33:34 +09:30
parent 722b4942ed
commit 1450a13c1f

View file

@ -485,10 +485,13 @@ static bool queue_channel_ranges(struct peer *peer,
if (blocknum >= first_blocknum + number_of_blocks)
break;
encoding_add_short_channel_id(&encoded_scids, &scid);
/* FIXME: Store csum in header. */
chan = get_channel(rstate, &scid);
if (!is_chan_public(chan))
continue;
encoding_add_short_channel_id(&encoded_scids, &scid);
get_checksum_and_timestamp(rstate, chan, 0,
&ts.timestamp_node_id_1,
&cs.checksum_node_id_1);