mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-19 05:44:12 +01:00
gossipd: ensure old private channel updates are properly deleted
When private channel updates exceed the gossip ratelimit, the previous gossip store entry was not deleted even though all private channel updates are stored. This caused gossip store corruption due to duplicate entries for the same channel. Fixes: #5656 Changelog-Fixed: Fixed gossip_store corruption from duplicate private channel updates
This commit is contained in:
parent
2605e117c9
commit
5bd6c715e5
@ -1423,6 +1423,9 @@ bool routing_add_channel_update(struct routing_state *rstate,
|
||||
is_chan_public(chan)
|
||||
? WIRE_CHANNEL_UPDATE
|
||||
: WIRE_GOSSIP_STORE_PRIVATE_UPDATE);
|
||||
} else if (!is_chan_public(chan)){
|
||||
gossip_store_delete(rstate->gs, &hc->rgraph,
|
||||
WIRE_GOSSIP_STORE_PRIVATE_UPDATE);
|
||||
}
|
||||
} else {
|
||||
/* Safe to broadcast */
|
||||
|
Loading…
Reference in New Issue
Block a user