Skip to content

Commit

Permalink
gossipd: don't consider dying channels when seeking preceeding channe…
Browse files Browse the repository at this point in the history
…l_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]>
  • Loading branch information
rustyrussell authored and cdecker committed Feb 12, 2024
1 parent e86093a commit f57d1f4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions gossipd/gossmap_manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f57d1f4

Please sign in to comment.