routing+routerrpc: also expose amt for success results in mc

This commit is contained in:
Joost Jager committed 2019-11-22 11:17:26 +01:00
1 parent 6f9fcfaccc
commit 62f8cca75b
9 files changed
+187 -166

No files matched your search

+2 -2
View File
@@ -92,7 +92,7 @@ func (p *probabilityEstimator) getNodeProbability(now time.Time,
// Weigh failures in accordance with their age. The base
// probability of a failure is considered zero, so nothing needs
// to be added to probabilitiesTotal.
case amt >= result.MinPenalizeAmt:
case amt >= result.Amt:
totalWeight += p.getWeight(age)
}
}
@@ -166,7 +166,7 @@ func (p *probabilityEstimator) calculateProbability(
// penalization. If the current amount is smaller than the amount that
// previously triggered a failure, we act as if this is an untried
// channel.
if amt < lastPairResult.MinPenalizeAmt {
if amt < lastPairResult.Amt {
return nodeProbability
}