gossip: Do not consider half-open connections for routes

Connections are in a half-open state after receiving the
`channel_announcement` and before the `channel_update` makes them
usable, so we need to ignore channels that are not yet fully open.
This commit is contained in:
Christian Decker 2016-12-14 23:42:06 +01:00 committed by Rusty Russell
parent 611f4833c5
commit e54c0adced

View File

@ -388,6 +388,8 @@ struct peer *find_route(const tal_t *ctx,
n = node_map_next(dstate->nodes, &it)) {
size_t num_edges = tal_count(n->in);
for (i = 0; i < num_edges; i++) {
if (!n->in[i]->active)
continue;
bfg_one_edge(n, i, riskfactor);
log_debug(dstate->base_log, "We seek %p->%p, this is %p -> %p",
dst, src, n->in[i]->src, n->in[i]->dst);