routing: add additionalEdges field to a missionControl's paymentSession

In this commit, we introduce the ability for payment sessions to store
an additional set of edges that can be used to assist a payment in
successfully reaching its destination.
This commit is contained in:
Wilmer Paulino
2018-03-26 23:53:46 -04:00
parent 5ddee85479
commit 7965247db1
2 changed files with 57 additions and 4 deletions

View File

@@ -1554,7 +1554,9 @@ func (r *ChannelRouter) SendPayment(payment *LightningPayment) ([32]byte, *Route
// Before starting the HTLC routing attempt, we'll create a fresh
// payment session which will report our errors back to mission
// control.
paySession := r.missionControl.NewPaymentSession()
paySession := r.missionControl.NewPaymentSession(
payment.RouteHints, payment.Target,
)
// We'll continue until either our payment succeeds, or we encounter a
// critical error during path finding.