| 260 | } |
| 261 | |
| 262 | static void normal_gossip_start(struct seeker *seeker, struct peer *peer, bool ask_for_all) |
| 263 | { |
| 264 | bool enable_stream = false; |
| 265 | |
| 266 | /* BOLT-remove-old-features #7: |
| 267 | * Understanding of messages used to be indicated with the `gossip_queries` |
| 268 | * feature bit; now these messages are universally supported, that feature has |
| 269 | * now been slightly repurposed. Not offering this feature means a node is not |
| 270 | * worth querying for gossip: either they do not store the entire gossip map, or |
| 271 | * they are only connected to a single peer (this one). |
| 272 | */ |
| 273 | if (!peer->gossip_queries_feature) |
| 274 | return; |
| 275 | |
| 276 | /* Make this one of our streaming gossipers if we aren't full */ |
| 277 | for (size_t i = 0; i < tal_count(seeker->gossiper); i++) { |
| 278 | if (seeker->gossiper[i] == NULL) { |
| 279 | seeker->gossiper[i] = peer; |
| 280 | enable_stream = true; |
| 281 | break; |
| 282 | } |
| 283 | } |
| 284 | |
| 285 | if (enable_stream) |
| 286 | enable_gossip_stream(seeker, peer, ask_for_all); |
| 287 | else |
| 288 | disable_gossip_stream(seeker, peer); |
| 289 | } |
| 290 | |
| 291 | /* Turn unknown_scids map into a flat array, removes from map. */ |
| 292 | static struct short_channel_id *unknown_scids_remove(const tal_t *ctx, |
no test coverage detected