Browse Source

gossip: Fix crash of getroute if we don't know any channels

This happens when we either have no channel open, or didn't announce
the channel. This patch just fails the getroute request. I'll later
add the non-broadcast announcement for local channels that should fix
this for unannounced channels.
ppa-0.6.1
Christian Decker 7 years ago
committed by Rusty Russell
parent
commit
fbe3a017a9
  1. 4
      daemon/routing.c

4
daemon/routing.c

@ -371,6 +371,10 @@ find_route(const tal_t *ctx, struct routing_state *rstate,
log_info_struct(rstate->base_log, "find_route: cannot find %s",
struct pubkey, to);
return NULL;
} else if (!dst) {
log_info_struct(rstate->base_log, "find_route: cannot find myself (%s)",
struct pubkey, to);
return NULL;
} else if (dst == src) {
log_info_struct(rstate->base_log, "find_route: this is %s, refusing to create empty route",
struct pubkey, to);

Loading…
Cancel
Save