routing: process successes in mission control

This commit modifies paymentLifecycle so that it not only feeds
failures into mission control, but successes as well.
This allows for more accurate probability estimates. Previously,
the success probability for a successful pair and a pair with
no history was equal. There was no force that pushed towards
previously successful routes.
This commit is contained in:
Joost Jager
2019-07-29 14:20:06 +02:00
parent 2594abfba1
commit ff0c5a0d5e
12 changed files with 415 additions and 190 deletions

View File

@@ -183,6 +183,10 @@ type MissionController interface {
failureSourceIdx *int, failure lnwire.FailureMessage) (
*channeldb.FailureReason, error)
// ReportPaymentSuccess reports a successful payment to mission control as input
// for future probability estimates.
ReportPaymentSuccess(paymentID uint64, rt *route.Route) error
// GetProbability is expected to return the success probability of a
// payment from fromNode along edge.
GetProbability(fromNode, toNode route.Vertex,