Skip to content

Commit f57d1f4

Browse files
rustyrussellcdecker
authored andcommitted
gossipd: don't consider dying channels when seeking preceeding channel_announcements.
We make sure a node_announcement is preceeded by at least one channel_announcement, but dying ones don't count (as they are not broadcast!). Signed-off-by: Rusty Russell <[email protected]>
1 parent e86093a commit f57d1f4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

gossipd/gossmap_manage.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,12 @@ static bool any_cannounce_preceeds_offset(struct gossmap *gossmap,
216216

217217
if (chan == exclude_chan)
218218
continue;
219-
if (chan->cann_off < offset)
220-
return true;
219+
if (chan->cann_off > offset)
220+
continue;
221+
/* Dying channels don't help! */
222+
if (gossmap_chan_is_dying(gossmap, chan))
223+
continue;
224+
return true;
221225
}
222226
return false;
223227
}

0 commit comments

Comments
 (0)