Browse Source

gossipd: Replace lookup by short_channel_id by endpoint lookup

Sometimes we could get into a situation in which we knew the channel
but couldn't find it via the short_channel_id. That'd result in a
replacement which triggered an assert.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
ppa-0.6.1
Christian Decker 7 years ago
committed by Rusty Russell
parent
commit
3923109f51
  1. 4
      gossipd/routing.c

4
gossipd/routing.c

@ -573,8 +573,8 @@ bool handle_channel_announcement(
/* Is this a new connection? It is if we don't know the
* channel yet, or do not have a matching announcement in the
* case of side-loaded channels*/
c0 = get_connection_by_scid(rstate, &short_channel_id, 0);
c1 = get_connection_by_scid(rstate, &short_channel_id, 1);
c0 = get_connection(rstate, &node_id_2, &node_id_1);
c1 = get_connection(rstate, &node_id_1, &node_id_2);
forward = !c0 || !c1 || !c0->channel_announcement || !c1->channel_announcement;
add_channel_direction(rstate, &node_id_1, &node_id_2, &short_channel_id,

Loading…
Cancel
Save