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 <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2024-02-11 21:07:41 +10:30
committed by Christian Decker
parent e86093a944
commit f57d1f460e

View File

@@ -216,8 +216,12 @@ static bool any_cannounce_preceeds_offset(struct gossmap *gossmap,
if (chan == exclude_chan)
continue;
if (chan->cann_off < offset)
return true;
if (chan->cann_off > offset)
continue;
/* Dying channels don't help! */
if (gossmap_chan_is_dying(gossmap, chan))
continue;
return true;
}
return false;
}