From 3af2dcba6a5d5fbd83c6ab0ae97609ad69c64b3e Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Thu, 28 Dec 2017 16:01:57 +0100 Subject: [PATCH] gossip: Fix a typo in the add_channel_direction logic Signed-off-by: Christian Decker Reported-by: William Casarin @jb55 --- gossipd/routing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gossipd/routing.c b/gossipd/routing.c index 48ad2b8d6..75fce9007 100644 --- a/gossipd/routing.c +++ b/gossipd/routing.c @@ -441,7 +441,7 @@ add_channel_direction(struct routing_state *rstate, const struct pubkey *from, /* We already know the channel by its scid, just * update the announcement below */ c = c2; - } else if (c2) { + } else if (c1) { /* We found the channel by its endpoints, not by scid, * so update its scid */ memcpy(&c1->short_channel_id, short_channel_id,