From e7f1f29dbdce3c215b0274fbe32c5d8dbbcc484f Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 12 Feb 2024 11:41:47 +1030 Subject: [PATCH] connectd: don't suppress channel_announcement without channel_update yet. This happens if: 1. The peer sets a timestamp filter to non-zero, and 2. We have a channel_announcement without a channel_update. The timestamp is 0 as a placeholder as part of the recent gossip rework (we used to hold these channel_announcement in memory, which was complex). But this means we won't send it in this case, and if we later send the channel_update, CI will complain about 'Bad gossip order'. Signed-off-by: Rusty Russell --- connectd/gossip_store.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/connectd/gossip_store.c b/connectd/gossip_store.c index c3e94dbf7..74c3b088e 100644 --- a/connectd/gossip_store.c +++ b/connectd/gossip_store.c @@ -138,8 +138,10 @@ u8 *gossip_store_next(const tal_t *ctx, /* Skip any timestamp filtered */ timestamp = be32_to_cpu(hdr.timestamp); - if (!timestamp_filter(timestamp_min, timestamp_max, - timestamp)) { + /* Note: channel_announcements without a channel_update yet + * will have 0 timestamp (we don't know). Better to send them. */ + if (timestamp && + !timestamp_filter(timestamp_min, timestamp_max, timestamp)) { *off += r + msglen; continue; }