Skip to content

Commit fd4d3bf

Browse files
committed
Multi-Hop Route Hint as per Bolt 12 now considered
Bolt 12 details the process of picking up route hints from payee using the lightning invoice. This PR brings the changes to use multiple route hints from payee picked from the invoice. The route hints are processed in the following manner:- - `get_route()` receives the hints in `last_hops`. - Every `RouteHintHop` in `RouteHint` is processed based on feasiblity of channel capacity and fees. - If a `RouteHintHop` then preceeding `RouteHintHop`s are not processed. - A direct route is checked from `first_hops_targets` to the first `RouteHintHop` if the respective `RouteHint` is processed from the payee's end till the first `RouteHintHop`. `partial_route_hint_test`, `ignores_empty_last_hops_test`, `multi_hint_last_hops_test` and `last_hops_with_public_channel_test` test usage of partial route hints for building optimal route, processing empty route hint hops, complete usage of private route hints and presence of public channels in route hints respectively. Resolves: #945
1 parent 8530078 commit fd4d3bf

File tree

2 files changed

+395
-40
lines changed

2 files changed

+395
-40
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ lightning-c-bindings/a.out
77
**/*.rs.bk
88
Cargo.lock
99
.idea
10-
10+
lightning/target

0 commit comments

Comments
 (0)