From 9e93826eeaab1e9c1362362ae4c541f3765e462f Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 15 Feb 2023 09:44:59 +1030 Subject: [PATCH] gossipd: neaten node_has_broadcastable_channels logic. Signed-off-by: Rusty Russell --- gossipd/routing.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gossipd/routing.c b/gossipd/routing.c index 8f6147db9..3558684dd 100644 --- a/gossipd/routing.c +++ b/gossipd/routing.c @@ -424,8 +424,10 @@ static bool node_has_broadcastable_channels(struct node *node) for (c = first_chan(node, &i); c; c = next_chan(node, &i)) { if (!is_chan_public(c)) continue; - if ((is_halfchan_defined(&c->half[0]) - || is_halfchan_defined(&c->half[1])) && !is_chan_zombie(c)) + if (is_chan_zombie(c)) + continue; + if (is_halfchan_defined(&c->half[0]) + || is_halfchan_defined(&c->half[1])) return true; } return false;