mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-27 23:36:15 +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:
@@ -473,13 +473,14 @@ func (s *Server) QueryMissionControl(ctx context.Context,
|
||||
pair := p
|
||||
|
||||
rpcPair := PairHistory{
|
||||
NodeFrom: pair.Pair.From[:],
|
||||
NodeTo: pair.Pair.To[:],
|
||||
LastFailTime: pair.LastFail.Unix(),
|
||||
NodeFrom: pair.Pair.From[:],
|
||||
NodeTo: pair.Pair.To[:],
|
||||
Timestamp: pair.Timestamp.Unix(),
|
||||
MinPenalizeAmtSat: int64(
|
||||
pair.MinPenalizeAmt.ToSatoshis(),
|
||||
),
|
||||
SuccessProb: float32(pair.SuccessProb),
|
||||
SuccessProb: float32(pair.SuccessProb),
|
||||
LastAttemptSuccessful: pair.LastAttemptSuccessful,
|
||||
}
|
||||
|
||||
rpcPairs = append(rpcPairs, &rpcPair)
|
||||
|
Reference in New Issue
Block a user