mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user