gossipd: fix crash from gossip_store v10 changes

routing.c fixed to properly remove rate-limited gossip_store entries
when channels are closed. This caused gossipd to crash on a subsequent
gossip_store_load. Also corrects an overzealous limit of one gossip_store
entry per message (should now allow one broadcastable and one
rate-limited). Addresses issues 5387, 5395.

Changelog-None
This commit is contained in:
Alex Myers
2022-07-10 17:13:09 -05:00
committed by Rusty Russell
parent 312751075c
commit ddf8fbdb5d
4 changed files with 83 additions and 24 deletions

View File

@@ -363,7 +363,8 @@ bool routing_add_channel_update(struct routing_state *rstate,
const u8 *update TAKES,
u32 index,
struct peer *peer,
bool ignore_timestamp);
bool ignore_timestamp,
bool force_spam_flag);
/**
* Add a node_announcement to the network view without checking it
*
@@ -375,7 +376,8 @@ bool routing_add_node_announcement(struct routing_state *rstate,
const u8 *msg TAKES,
u32 index,
struct peer *peer,
bool *was_unknown);
bool *was_unknown,
bool force_spam_flag);
/**