expected_id is NULL for initial node (aka l2) */
| 275 | |
| 276 | /* expected_id is NULL for initial node (aka l2) */ |
| 277 | static struct node *get_current_node(struct info *info, |
| 278 | const struct node_id *expected_id) |
| 279 | { |
| 280 | if (!expected_id) |
| 281 | return info->peer; |
| 282 | |
| 283 | return node_map_get(info->node_map, expected_id); |
| 284 | } |
| 285 | |
| 286 | static void populate_node_map(const struct gossmap *gossmap, |
| 287 | struct node_map *node_map) |