Skip to content

Commit

Permalink
gossipd: don't try to delete node_announcement twice if it's the same…
Browse files Browse the repository at this point in the history
… node.

Theoretical problem, but still...

Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Feb 14, 2024
1 parent d716e6d commit 53feb0b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gossipd/gossmap_manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,10 @@ static void remove_channel(struct gossmap_manage *gm,

node = gossmap_nth_node(gossmap, chan, dir);

/* Don't get confused if a node has a channel with self! */
if (dir == 1 && node == gossmap_nth_node(gossmap, chan, 0))
continue;

/* If there was a node announcement, we might need to fix things up. */
if (!gossmap_node_announced(node))
continue;
Expand Down

0 comments on commit 53feb0b

Please sign in to comment.