gossmap: fix reutrn of gossmap_xxx_has_feature, rename.

1. One place returned false instead of -1.
2. The names implied it returned a bool, and it doesn't.

Fix both, and curse C's loose typing a little.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2020-10-27 10:46:02 +10:30
parent 1e173463c9
commit cd5a93d0bd
3 changed files with 6 additions and 6 deletions

View File

@@ -652,7 +652,7 @@ static struct route_hop *route_hops_from_route(const tal_t *ctx,
/* nodeid is nodeid of *dst* */
dst = gossmap_nth_node(gossmap, r[i]->c, !r[i]->dir);
gossmap_node_get_id(gossmap, dst, &hops[i].nodeid);
if (gossmap_node_has_feature(gossmap, dst, OPT_VAR_ONION) != -1)
if (gossmap_node_get_feature(gossmap, dst, OPT_VAR_ONION) != -1)
hops[i].style = ROUTE_HOP_TLV;
else
hops[i].style = ROUTE_HOP_LEGACY;