mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-20 13:04:28 +02:00
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:
@@ -38,10 +38,11 @@ func queryMissionControl(ctx *cli.Context) error {
|
||||
}
|
||||
|
||||
type displayPairHistory struct {
|
||||
NodeFrom, NodeTo string
|
||||
LastFailTime int64
|
||||
SuccessProb float32
|
||||
MinPenalizeAmtSat int64
|
||||
NodeFrom, NodeTo string
|
||||
LastAttemptSuccessful bool
|
||||
Timestamp int64
|
||||
SuccessProb float32
|
||||
MinPenalizeAmtSat int64
|
||||
}
|
||||
|
||||
displayResp := struct {
|
||||
@@ -64,11 +65,12 @@ func queryMissionControl(ctx *cli.Context) error {
|
||||
displayResp.Pairs = append(
|
||||
displayResp.Pairs,
|
||||
displayPairHistory{
|
||||
NodeFrom: hex.EncodeToString(n.NodeFrom),
|
||||
NodeTo: hex.EncodeToString(n.NodeTo),
|
||||
LastFailTime: n.LastFailTime,
|
||||
SuccessProb: n.SuccessProb,
|
||||
MinPenalizeAmtSat: n.MinPenalizeAmtSat,
|
||||
NodeFrom: hex.EncodeToString(n.NodeFrom),
|
||||
NodeTo: hex.EncodeToString(n.NodeTo),
|
||||
LastAttemptSuccessful: n.LastAttemptSuccessful,
|
||||
Timestamp: n.Timestamp,
|
||||
SuccessProb: n.SuccessProb,
|
||||
MinPenalizeAmtSat: n.MinPenalizeAmtSat,
|
||||
},
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user