Browse Source

gossip: Make sure we never add a channel twice

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

3
gossipd/routing.c

@ -210,6 +210,9 @@ struct chan *new_chan(struct routing_state *rstate,
size_t n;
struct node *n1, *n2;
/* We should never add a channel twice */
assert(!uintmap_get(&rstate->chanmap, scid->u64));
/* Create nodes on demand */
n1 = get_node(rstate, id1);
if (!n1)

Loading…
Cancel
Save