| 1420 | } |
| 1421 | |
| 1422 | static bool matches_chan_id(struct token *token, struct channel_id chan_id) |
| 1423 | { |
| 1424 | if (token->chan_id && channel_id_eq(token->chan_id, &chan_id)) |
| 1425 | return true; |
| 1426 | |
| 1427 | if (token->left && matches_chan_id(token->left, chan_id)) |
| 1428 | return true; |
| 1429 | |
| 1430 | if (token->middle && matches_chan_id(token->middle, chan_id)) |
| 1431 | return true; |
| 1432 | |
| 1433 | if (token->right && matches_chan_id(token->right, chan_id)) |
| 1434 | return true; |
| 1435 | |
| 1436 | return false; |
| 1437 | } |
| 1438 | |
| 1439 | /* Searches through both tokensA and tokensB. */ |
| 1440 | static struct node_id *first_node_with_unused_chan(const tal_t *ctx, |
no outgoing calls
no test coverage detected