routing: introduce routing hints to lightning payments

In this commit, we add a new field of routing hints to payments over the
Lightning Network. These routing hints can later be used within the path
finding algorithm in order to craft a path that will reach the
destination succesfully.
This commit is contained in:
Wilmer Paulino
2018-03-27 00:00:24 -04:00
parent c8abeb46a5
commit 1e5659e5f4
2 changed files with 32 additions and 0 deletions

View File

@@ -1482,6 +1482,16 @@ type LightningPayment struct {
// indefinitely.
PayAttemptTimeout time.Duration
// RouteHints represents the different routing hints that can be used to
// assist a payment in reaching its destination successfully. These
// hints will act as intermediate hops along the route.
//
// NOTE: This is optional unless required by the payment. When providing
// multiple routes, ensure the hop hints within each route are chained
// together and sorted in forward order in order to reach the
// destination successfully.
RouteHints [][]HopHint
// TODO(roasbeef): add e2e message?
}