mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
route: assume modern TLV support if we don't see a node_announcement.
This is in preparation for removing support (next release?). Changelog-Changed: Protocol: We now assume nodes support TLV onions (non-legacy) unless we have a node_announcement which says they don't. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
neil saitug
parent
e7716c86fb
commit
28553e9bea
@@ -107,7 +107,9 @@ static bool dijkstra_to_hops(struct route_hop **hops,
|
||||
/* Find other end of channel. */
|
||||
next = gossmap_nth_node(gossmap, c, !(*hops)[num_hops].direction);
|
||||
gossmap_node_get_id(gossmap, next, &(*hops)[num_hops].node_id);
|
||||
if (gossmap_node_get_feature(gossmap, next, OPT_VAR_ONION) != -1)
|
||||
/* If we don't have a node_announcement, we *assume* modern */
|
||||
if (next->nann_off == 0
|
||||
|| gossmap_node_get_feature(gossmap, next, OPT_VAR_ONION) != -1)
|
||||
(*hops)[num_hops].style = ROUTE_HOP_TLV;
|
||||
else
|
||||
(*hops)[num_hops].style = ROUTE_HOP_LEGACY;
|
||||
|
||||
Reference in New Issue
Block a user