mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-09 06:54:32 +02:00
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:
@ -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