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:
committed by
Christian Decker
parent
e86093a944
commit
f57d1f460e
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user