1
0
Fork 0
mirror of https://github.com/ACINQ/eclair.git synced 2025-02-23 06:35:11 +01:00

Better logging for NegativeProbability exception (#2171)

Show details that lead to this exception.
This commit is contained in:
Thomas HUET 2022-02-09 10:49:38 +01:00 committed by GitHub
parent ca71a3c152
commit 66aafd6872
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -135,7 +135,7 @@ object RouteCalculation {
Metrics.FindRouteErrors.withTags(tags.withTag(Tags.Error, "InfiniteLoop")).increment() Metrics.FindRouteErrors.withTags(tags.withTag(Tags.Error, "InfiniteLoop")).increment()
ctx.sender() ! Status.Failure(failure) ctx.sender() ! Status.Failure(failure)
case Failure(failure: NegativeProbability) => case Failure(failure: NegativeProbability) =>
log.error(s"computed negative probability $failure") log.error(s"computed negative probability: edge=${failure.edge}, weight=${failure.weight}, heuristicsConstants=${failure.heuristicsConstants}")
Metrics.FindRouteErrors.withTags(tags.withTag(Tags.Error, "NegativeProbability")).increment() Metrics.FindRouteErrors.withTags(tags.withTag(Tags.Error, "NegativeProbability")).increment()
ctx.sender() ! Status.Failure(failure) ctx.sender() ! Status.Failure(failure)
case Failure(t) => case Failure(t) =>