From 1d93f201743e463c899bfb959279cbe059b3a7cd Mon Sep 17 00:00:00 2001 From: Alex Myers Date: Fri, 4 Oct 2024 11:22:20 -0500 Subject: [PATCH] gossmap: delete channels from map when deleted from store This addresses a crash where a deleted channel is added to the txout_failures map, and temporarily ignored, but a reference is still kept in the gossmap. When the channel expires fromt the txout_failures map, it is once again looked up in the gossmap, leading to a crash while accessing a deleted entry. Fixes #7689 Changelog-Fixed: Fixes a crash in gossipd accessing a deleted channel. --- gossipd/gossmap_manage.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gossipd/gossmap_manage.c b/gossipd/gossmap_manage.c index 1e973f7ea2a2..ee7c82b099f4 100644 --- a/gossipd/gossmap_manage.c +++ b/gossipd/gossmap_manage.c @@ -318,6 +318,7 @@ static void remove_channel(struct gossmap_manage *gm, GOSSIP_STORE_DYING_BIT, WIRE_NODE_ANNOUNCEMENT); } + gossmap_remove_chan(gossmap, chan); } static u32 get_timestamp(struct gossmap *gossmap,