Skip to content

Commit e7f1f29

Browse files
rustyrussellcdecker
authored andcommitted
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 <[email protected]>
1 parent a0ed611 commit e7f1f29

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

connectd/gossip_store.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,10 @@ u8 *gossip_store_next(const tal_t *ctx,
138138

139139
/* Skip any timestamp filtered */
140140
timestamp = be32_to_cpu(hdr.timestamp);
141-
if (!timestamp_filter(timestamp_min, timestamp_max,
142-
timestamp)) {
141+
/* Note: channel_announcements without a channel_update yet
142+
* will have 0 timestamp (we don't know). Better to send them. */
143+
if (timestamp &&
144+
!timestamp_filter(timestamp_min, timestamp_max, timestamp)) {
143145
*off += r + msglen;
144146
continue;
145147
}

0 commit comments

Comments
 (0)