Move this node's announcement to the tail of the gossip_store, to * make everyone send it again. */
| 436 | /* Move this node's announcement to the tail of the gossip_store, to |
| 437 | * make everyone send it again. */ |
| 438 | static void force_node_announce_rexmit(struct routing_state *rstate, |
| 439 | struct node *node) |
| 440 | { |
| 441 | const u8 *announce; |
| 442 | bool is_local = node_id_eq(&node->id, &rstate->local_id); |
| 443 | announce = gossip_store_get(tmpctx, rstate->gs, node->bcast.index); |
| 444 | |
| 445 | u32 initial_bcast_index = node->bcast.index; |
| 446 | gossip_store_delete(rstate->gs, |
| 447 | &node->bcast, |
| 448 | WIRE_NODE_ANNOUNCEMENT); |
| 449 | node->bcast.index = gossip_store_add(rstate->gs, |
| 450 | announce, |
| 451 | node->bcast.timestamp, |
| 452 | is_local, |
| 453 | false, |
| 454 | NULL); |
| 455 | if (node->rgraph.index == initial_bcast_index){ |
| 456 | node->rgraph.index = node->bcast.index; |
| 457 | } else { |
| 458 | announce = gossip_store_get(tmpctx, rstate->gs, node->rgraph.index); |
| 459 | gossip_store_delete(rstate->gs, |
| 460 | &node->rgraph, |
| 461 | WIRE_NODE_ANNOUNCEMENT); |
| 462 | node->rgraph.index = gossip_store_add(rstate->gs, |
| 463 | announce, |
| 464 | node->rgraph.timestamp, |
| 465 | is_local, |
| 466 | false, |
| 467 | NULL); |
| 468 | } |
| 469 | } |
| 470 | |
| 471 | static void remove_chan_from_node(struct routing_state *rstate, |
| 472 | struct node *node, const struct chan *chan) |
no test coverage detected