routing/result_interpretation: fix off-by-one for incoming failure
Previously we would not mark a success for the first hop if the fail source index was 2. We also add a test to assert this behavior.
This commit is contained in:
2 files changed
+31
-2
No files matched your search
@@ -265,7 +265,7 @@ func (i *interpretedResult) processPaymentOutcomeIntermediate(
|
||||
|
||||
// All nodes up to the failing pair must have forwarded
|
||||
// successfully.
|
||||
if errorSourceIdx > 2 {
|
||||
if errorSourceIdx > 1 {
|
||||
i.successPairRange(route, 0, errorSourceIdx-2)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user