| 249 | } |
| 250 | |
| 251 | static u8 *handle_channel_update_msg(struct peer *peer, const u8 *msg) |
| 252 | { |
| 253 | struct short_channel_id unknown_scid; |
| 254 | /* Hand the channel_update to the routing code */ |
| 255 | u8 *err; |
| 256 | |
| 257 | unknown_scid.u64 = 0; |
| 258 | err = handle_channel_update(peer->daemon->rstate, msg, peer, |
| 259 | &unknown_scid, false); |
| 260 | if (err) |
| 261 | return err; |
| 262 | |
| 263 | /* If it's an unknown channel, ask someone about it */ |
| 264 | if (unknown_scid.u64 != 0) |
| 265 | query_unknown_channel(peer->daemon, peer, &unknown_scid); |
| 266 | |
| 267 | /*~ As a nasty compromise in the spec, we only forward `channel_announce` |
| 268 | * once we have a `channel_update`; the channel isn't *usable* for |
| 269 | * routing until you have both anyway. For this reason, we might have |
| 270 | * just sent out our own channel_announce, so we check if it's time to |
| 271 | * send a node_announcement too. */ |
| 272 | maybe_send_own_node_announce(peer->daemon, false); |
| 273 | return NULL; |
| 274 | } |
| 275 | |
| 276 | static u8 *handle_node_announce(struct peer *peer, const u8 *msg) |
| 277 | { |
no test coverage detected