gossipd: neaten node_has_broadcastable_channels logic.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2023-02-15 09:44:59 +10:30 committed by Alex Myers
parent 73e50b26f9
commit 9e93826eea
1 changed files with 4 additions and 2 deletions

View File

@ -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;