gossipd: remove any zombified node_announcements on load.

This can happen if you were running an rc.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2023-02-15 15:03:57 +10:30 committed by Alex Myers
parent 2e7c08824a
commit baeebf2863

View file

@ -879,6 +879,13 @@ u32 gossip_store_load(struct routing_state *rstate, struct gossip_store *gs)
stats[1]++;
break;
case WIRE_NODE_ANNOUNCEMENT:
/* In early v23.02 rcs we had zombie node announcements,
* so throw them away here. */
if (be16_to_cpu(hdr.flags) & GOSSIP_STORE_ZOMBIE_BIT) {
status_unusual("gossip_store: removing zombie"
" node_announcement from v23.02 rcs");
break;
}
if (!routing_add_node_announcement(rstate,
take(msg), gs->len,
NULL, NULL, spam)) {