| 186 | } |
| 187 | |
| 188 | struct peer *peer_by_id(struct lightningd *ld, const struct node_id *id) |
| 189 | { |
| 190 | struct peer *p; |
| 191 | |
| 192 | list_for_each(&ld->peers, p, list) |
| 193 | if (node_id_eq(&p->id, id)) |
| 194 | return p; |
| 195 | return NULL; |
| 196 | } |
| 197 | |
| 198 | struct peer *peer_from_json(struct lightningd *ld, |
| 199 | const char *buffer, |
no test coverage detected