Skip to content

Commit

Permalink
connectd: don't suppress channel_announcement without channel_update …
Browse files Browse the repository at this point in the history
…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 <[email protected]>
  • Loading branch information
rustyrussell authored and cdecker committed Feb 12, 2024
1 parent a0ed611 commit e7f1f29
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions connectd/gossip_store.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e7f1f29

Please sign in to comment.