mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-12-09 12:22:38 +01:00
routing: separate MissionControl from MissionControlManager
This commit renames the previous MissionControl to MissionController and the previous MissionController interface to MissionControlQuerier. This is done because soon the (new) MissionController will back multiple namespaced MissionControl instances. For now, it just houses a single MissionControl in the default namespace. This commit also replaces the MissionControl's `now` function with a `clock.Clock`.
This commit is contained in:
@@ -167,9 +167,9 @@ type PaymentSessionSource interface {
|
||||
NewPaymentSessionEmpty() PaymentSession
|
||||
}
|
||||
|
||||
// MissionController is an interface that exposes failure reporting and
|
||||
// MissionControlQuerier is an interface that exposes failure reporting and
|
||||
// probability estimation.
|
||||
type MissionController interface {
|
||||
type MissionControlQuerier interface {
|
||||
// ReportPaymentFail reports a failed payment to mission control as
|
||||
// input for future probability estimates. It returns a bool indicating
|
||||
// whether this error is a final error and no further payment attempts
|
||||
@@ -260,7 +260,7 @@ type Config struct {
|
||||
// Each run will then take into account this set of pruned
|
||||
// vertexes/edges to reduce route failure and pass on graph information
|
||||
// gained to the next execution.
|
||||
MissionControl MissionController
|
||||
MissionControl MissionControlQuerier
|
||||
|
||||
// SessionSource defines a source for the router to retrieve new payment
|
||||
// sessions.
|
||||
|
||||
Reference in New Issue
Block a user